Deactivate a test (TestStatusUpdate, UpdateTests)

In this use case, you want to deactivate a test, which decreases the number of active tests and increases the number of available tests. The number of tests that can be created is currently constrained to the number of tests purchased. So it is beneficial to deactivate tests if they are not currently useful, but may be useful to you at some future point in time. The method to do this is TestStatusUpdate(). Change the test’s status to Inactive and the test is deactivated.

You can also change the status of both a test and its folder using the UpdateTests method. You must build or fetch a Monitor element using GetTests() representing the current state of a browser monitor and modify the status fields. This Monitor element can then be passed as a parameter in the UpdateTests request.

Consequently, deactivating a test using the UpdateTests method requires a longer workflow:

  1. Get a snapshot of the test using the GetTests() method.

  2. Modify the Monitor's monitorStatus attribute, setting it to Inactive, and incorporate the Monitor element into an UpdateTests message.

Sample TestStatusUpdate request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:TestStatusUpdateRequest>
         <prov:Credentials>
            <prov:UserName>MyUser</prov:UserName>
            <prov:Password>MyPassword</prov:Password>
         </prov:Credentials>
         <!--1 or more repetitions:-->
         <prov:TestStatusUpdate monitorId="270276" status="Inactive"/>
      </prov:TestStatusUpdateRequest>
   </soapenv:Body>
</soapenv:Envelope>

Sample UpdateTests request to deactivate test

The following message deactivates a test while leaving the folder in the active state. The status of other tests within the folder will not change.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:UpdateTestsRequest>
         <prov:Credentials>
            <prov:UserName>MyUser</prov:UserName>
            <prov:Password>MyPassword</prov:Password>
         </prov:Credentials>
         <prov:Monitors>
            <prov:Monitor name="Site Management Test SingleStepMonitor"
                          folder="Site Management Tests"
                          agentType="IE"
                          summaryFlag="On"
                          includeRenderTimeFlag="On"
                          frequencyInMins="60"
                          expirationDate="2012-08-15T10:17:12"
                          ipVersion="IPv4_only"
                          monitorStatus="Inactive"
                          folderStatus="Active"
                          monitorId="263756"
                          createDate="2012-07-19T14:17:11.953"
                          modifyDate="2012-07-21T00:05:00.583"
                          scriptId="263756">
               <prov:MonitorSites>
                  <prov:MonitorSite siteId="865"/>
                  <prov:MonitorSite siteId="866"/>
                  <prov:MonitorSite siteId="873"/>
                  <prov:MonitorSite siteId="880"/>
                  <prov:MonitorSite siteId="886"/>
               </prov:MonitorSites>
               <prov:Steps>
                  <prov:Step stepSeqNum="0">
                     <prov:URL>http://www.dynatrace.com</prov:URL>
                     <prov:DisplayName/>
                  </prov:Step>
               </prov:Steps>
            </prov:Monitor>
         </prov:Monitors>
      </prov:UpdateTestsRequest>
   </soapenv:Body>
</soapenv:Envelope>

Sample UpdateTests request to deactivate folder

If one set's the folder's status to Inactive, all of the tests within the folder will also be deactivated:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:UpdateTestsRequest>
         <prov:Credentials>
            <prov:UserName>MyUser</prov:UserName>
            <prov:Password>MyPassword</prov:Password>
         </prov:Credentials>
         <prov:Monitors>
            <prov:Monitor name="Site Management Test SingleStepMonitor"
                          folder="Site Management Tests"
                          agentType="IE"  
                          summaryFlag="On"
                          includeRenderTimeFlag="On"
                          frequencyInMins="60"
                          expirationDate="2012-08-15T10:17:12"
                          ipVersion="IPv4_only"
                          monitorStatus="Inactive"
                          folderStatus="Inactive"
                          monitorId="263756"
                          createDate="2012-07-19T14:17:11.953"
                          modifyDate="2012-07-21T00:05:00.583"
                          scriptId="263756">
               <prov:MonitorSites>
                  <prov:MonitorSite siteId="865"/>
                  <prov:MonitorSite siteId="866"/>
                  <prov:MonitorSite siteId="873"/>
                  <prov:MonitorSite siteId="880"/>
                  <prov:MonitorSite siteId="886"/>
               </prov:MonitorSites>
               <prov:Steps>
                  <prov:Step stepSeqNum="0">
                     <prov:URL>http://www.dynatrace.com</prov:URL>
                     <prov:DisplayName/>
                  </prov:Step>
               </prov:Steps>
            </prov:Monitor>
         </prov:Monitors>
      </prov:UpdateTestsRequest>
   </soapenv:Body>
</soapenv:Envelope>