Pega Robot Studio UNIT Testing during development (Pega Inspector) in v22.1
Hello Pega Community,
We were wondering how to test automations using global variables without changing the code.
In 19.1 we were using pega inspector, where we could set global variables, is something like this available in studio 22.1 ?
@DavidT
In Pega Robot Studio 19.1, the Pega Inspector let you set global variables at runtime to test different automation paths without changing the code. In version 22.1, that exact tool isn’t available, but you can achieve similar testing by using breakpoints and the Locals/Watch window in debug mode. When you hit a breakpoint, you can manually edit the values of global variables or parameters in the Watch window before continuing execution, which simulates the old Inspector behavior. Another option is to temporarily store test values in a configuration file or Excel sheet and load them at runtime so you can swap them easily without touching the main automation logic. For more complex scenarios, you can also create a dedicated “test harness” automation that initializes globals with different values and then triggers the automation under test. This allows repeatable tests without altering production code. While it’s not as direct as the old Inspector, combining debug tools, variable watches, and test harness automations gives you the same flexibility for unit testing in 22.1.