A SyntheticTest object represents a test in a SyntheticDeployment.
String name: (Read-only) Name of the test.
Number userCount: (Read-only) Number of concurrent simulated users to run for this test.
Number interval: (Read-only) Time (in milliseconds) between executions of this test.
Boolean enabled: (Read-only) True if the test is activated.
Boolean includeRollup: Whether a roll‑up alarm should be generated with this test with the cumulative response time of all scenarios in the test.
String toString(): Returns a string representation of this object.
SyntheticScenario[] getScenarios(): Returns an ordered array of all scenarios in this test as SyntheticScenario objects.
SyntheticScenario getScenarioByName(String name): Returns the scenario in this test where the SyntheticScenario.name is equal to the provided name. If no scenario has the provided name, null is returned.
SyntheticScenario getScenarioBySeqNum(Number seqNum): Returns the scenario in this test where the SyntheticScenario.seqNum is equal to the provided value. If no scenario has the provided sequence number, null is returned.
A SyntheticTest object represents a test in a SyntheticDeployment. These tests 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 SyntheticTest.
function showTestOp(parmMap)
{
var testName=parmMap.get("testName");
var deployment = testEngine.getDeployment();
var test = deployment.getTest(testName);
if(test == null)
{
return 'Test ' +testName + ' not found';
}
return testToHTML(test);
}
function testToHTML(test)
{
var html = '<table border="1">';
html += addItem('name', test.name);
html += addItem('userCount', test.userCount);
html += addItem('interval', test.interval);
html += addItem('enabled', test.enabled);
html += addItem('includeRollup', test.includeRollup);
var scenarios = test.getScenarios();
for(var i=0;i< scenarios.length; i++)
{
html+= addItem('scenario-' + scenarios[i].seqNum,scenarioToHTML(scenarios[i]));
}
html += '</table>';
return html;
}
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>';
}