A SyntheticScenario object represents a scenario in a SyntheticTest.
String name: (Read-only) Name of the scenario.
Object type: (Read-only) Type of scenario corresponding to one of the testEngine.constants values.
Boolean enabled: (Read-only) True if the scenario is activated.
String testName: (Read-only) Name of the test containing the scenario.
Number seqNum: (Read-only) Sequence number of the scenario within the enclosing test.
Number delay: (Read-only) Artificial delay (in milliseconds) inserted before the scenario executes.
Number timeout: (Read-only) Amount of time (in milliseconds) before the scenario is marked as failed because it took too long.
Number retries: (Read-only) Number of times to retry the scenario in the event of a failure.
Boolean continureOnFailure: Whether the test should continue to the next scenario if this scenario fails.
Boolean includeRollup: Whether a roll‑up alarm should be generated with this scenario with the cumulative response time since the previous roll‑up.
String toString(): Returns a string representation of this object.
A SyntheticScenario object represents a scenario in a SyntheticTest. These scenarios are created and managed in the Experience Manager adapter using the Operations Center console. A read-only view is exposed in the Monitor’s scripting layer to facilitate Web Operations and Synthetic Test Management functionality. The following example shows a simple WebOps that displays the content of a requested SyntheticScenario.
function showScenarioOp(parmMap) { var testName=parmMap.get("testName"); var index =parmMap.get("index"); var deployment = testEngine.getDeployment(); var test = deployment.getTest(testName); if(test == null) { return 'Test ' +testName + ' not found'; } var scenario = test.getScenarioBySeqNum(index); if(scenario == null) { return 'Scenario ' + index + ' not found in test ' + testName; } return scenarioToHTML(scenario); } function scenarioToHTML(scenario) { var html = '<table>'; html += addItem('name', scenario.name); html += addItem('type', scenario.type); html += addItem('enabled', scenario.enabled); html += addItem('testName', scenario.testName); html += addItem('seqNum', scenario.seqNum); html += addItem('delay', scenario.delay); html += addItem('timeout', scenario.timeout); html += addItem('retries', scenario.retries); html += addItem('continueOnFailure', scenario.continueOnFailure); html += addItem('includeRollup', scenario.includeRollup); html += '</table>'; return html; } function addItem(typeName, value) { return '<tr><td>' + typeName + '</td><td>' + value + '</td></tr>'; }