Skip to main content
Version: 8.0.2

Busy State Auto-track

Is App Busy Evaluator allows tracking and listening to the value of Pega element with a document-statetracker class. If Pega application is "busy" for some reason (injects an AJAX call, creates a new screen, sends an API request, creates a report, etc.) then the data-state-busy-status is equal to 'busy' (if there are no internal processes, status === "none").

This element is always available in the main frame of the main browser tab only (even if you open a new tab of the Pega application statetracker keeps existing in the parent one).

Test Maker platform allows us not to think about iframes or tabs, in this case, the busy status will be tracked for you from any iframe or tab! (and will not try to check the status if you are not in the Pega application context or if the UNIT adapter is used for the test case). By default, evaluator is checking the status before each action, but it can be changed in the configuration file.

How to add Busy State Auto-track to your project:

The main part of the evaluator is configured in the runner section in the config file:

Enable isAppBusy

runner: {
isAppBusyEvaluator: isAppBusyEvaluator,
}

IsAppBusy Logs

The bypasslogging terminal reporter option excludes all the messages about the steps performed by the evaluator but shows the info about the status and retries:

{
...reporters.terminal,
...{
options: <TerminalReporterOptions>{
bypass: bypassLogging,
},
},
},

When to consider test as failed

If you want to make your application FAIL when the statetracker is busy for more than 60 seconds, you need to add this part of the configuration:

failure: {
feature: {
skipRemainingScenariosOnScenarioFail: async (runInfo: TestRunInfo) => runInfo.appIsBusy,
},
},

If you DO NOT need it, you can use any other configuration, for example:

failure: {
feature: {
skipRemainingScenariosOnScenarioFail: true, //skips all the next scenarios of the feature
exitProcessOnFirstFail: false, //terminates the process after the first fail
skipRemainingStepsOnStepFail: true, //skips all the next steps if one of the steps in the scenario failed
},

How to skip

(And to make the evaluator SKIP your unit tests, pass the adapter type in this way: )

Feature(`SAC-1-1 Create the case via API`)
.adapters([AdapterType.UNIT])

An example of configuration with reporting (includes terminal, allure and text reporters):

reporting: {
reporters: [
{
...reporters.terminal,
...{
options: <TerminalReporterOptions>{
ignoreLogLevel: false,
bypass: bypassLogging,
feature: { start: true, done: true },
scenario: { start: true, done: true },
step: { start: true, done: true },
subStep: { start: false, done: false },
hook: { start: false, done: false },
controllerAction: { start: true, done: true },
selectorAction: { start: true, done: true, retries: false },
assertionAction: { start: false, done: true, retries: false },
scoreBase: 'feature',
},
},
},
{
...reporters.allure,
...{
options: <AllureReporterOptions>{
scoreBase: 'feature',
},
},
},
{...reporters.text}
],
},

If you want to make your application FAIL when the statetracker is busy for more than 30 seconds, you need this part to be added to the config (instead of true or false):

And to make the evaluator SKIP your unit tests pass the adapter type in this way:

Feature(`SAC-1-1 Create the case via API`)
.adapters([AdapterType.UNIT])