SyntheticDeployment

A SyntheticDeployment object provides access to the collection of SyntheticTest objects currently deployed to the monitor.

Properties

None.

Methods

  • SyntheticTest[] getTests(): Returns an array of all SyntheticTest objects currently deployed to this monitor.

  • SyntheticTest getTest(String name): Returns the test in this deployment where the SyntheticTest.name is equal to the provided name. If no test has the provided name, null is returned.

  • String toString(): Returns a string representation of this object.

Description

A SyntheticDeployment object provides access to the collection of SyntheticTest objects currently deployed to the monitor. This deployment is 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 SyntheticDeployment.

Example

function showDeploymentOp(parmMap)
{
   var html = '<table border="2">';
   var tests = testEngine.getDeployment().getTests();
   
   for(var i=0;i< tests.length; i++)
   {
      html += addItem('Test -' + tests[i].name,testToHTML(tests[i]))
   }
   html+='</table>';     
   return html;
}


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>'; 
}