GetParameterizedTests

This method obtains, under a given account, the list of monitors containing substitution parameters. Only monitors containing substitution parameters are returned. Substitution parameters are created in the GSL script at the global level. Their values may be overridden for specific monitor sites (Backbone nodes in the network). For example, in a given script, username and password may be parameterized and have default values. However, when the script is deployed to Backbone sites in the form of a test, user name and password can be overridden on any or all of the sites where the test is deployed.

Action

http://gpn.webservice.gomez.com/TestManagementWS_30/TestManagementService.asmx?op=GetParameterizedTests

Style

Document

Input (literal)

A GetParameterizedTestRequest includes, at the minimum, a Credentials object defining an employee for an account. Additionally, a ParameterizedTestFilter may be included to restrict the output of the method to a single Monitor or to a single Monitor Status (Active or Inactive).

Element Type Occurs Nillable? Description
SEQUENCE 1..1
Credentials anyType (restriction) 1..1 No A Credentials element contains the username and password of an account user. The element is required in all requests to the Test Management Web Service.
UserName [element Credentials] string 1..1 No The UserName of an employee for an account (and used for authentication).
Password [element Credentials] string 1..1 No A secret used as part of user credentials for authentication. Every request to the Test Management API web service must include a Credentials element. That element itself contains a UserName and a Password element.
ParameterizedTestFilter anyType (restriction) 0..1 No A ParameterizedTestFilter element is included in a GetParameterizedTestsRequest to limit the output of the GetParameterizedTests query. The output can be limited by monitor ID (only monitors whose IDs are listed in the filter can be returned) or by monitor status.
MonitorId [element ParameterizedTestFilter] string 0..1 No A monitor ID uniquely identifies a test in the Dynatrace Synthetic Monitoring system. When a MonitorId element appears in a ParameterizedTestFilter, it restricts the GetParameterizedTests output to that monitor ID. However, there will be output if and only if specified monitor has substitution parameters defined for it.
MonitorStatus [element ParameterizedTestFilter] MonitorStatusType 0..1 No The status of a test (may be Active or Inactive when included in a ParameterizedTestFilter).

Output (literal)

A GetParameterizedTestsResponse contains a list of 0 to many ParameterizedTest elements. A ParameterizedTest element contains the subset of information stored by the Dynatrace Portal, the subset needed to show both global and site-level substitution parameter data.

Element Type Occurs Nillable? Description
SEQUENCE 1..1
ResponseStatus ResponseStatusType 1..1 No This element appears in most of the responses issued when the Test Management API operations are invoked.
ErrorMessage [type OperationResponseType] string 0..1 No The error message is provided if the ResponseStatus was FAILURE.
ParameterizedMonitor anyType (restriction) 0..* No A ParameterizedMonitor is a description of a browser test that contains substitution parameters. This element appears in a GetParameterizedTestsResponse and in an AddOrUpdateSubstitutionParametersRequest. In the first context, it describes a configuration of an existing browser test (one that has substitution parameter definitions). In the second context, it describes the manner in which existing global substitution parameters are to be updated and/or the manner in which site-level substitution parameters are to be created, updated or deleted.

Example

Request

The following message requests all the monitors under a given account for which substitution parameters have been defined:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:GetParameterizedTestsRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
      </prov:GetParameterizedTestsRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response

Here is a sample response to the query:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetParameterizedTestsResponse xmlns="http://www.gomeznetworks.com/schemas/provisioning">
         <ResponseStatus>SUCCESS</ResponseStatus>
         <ParameterizedMonitor monitorId="328430" createDate=
            "2012-11-13T21:27:29.513" modifyDate=
            "2012-11-21T18:57:53.393" monitorStatus="Active">
            <SubstitutionParameters>
               <SubstitutionParameter id="0"
                 name="UserName" value="erics"/>
               <SubstitutionParameter id="1" name="Password"
                 value="erics"/>
            </SubstitutionParameters>
            <MonitorSites>
               <MonitorSite siteId="865">
                  <SubstitutionParameters>
                     <SubstitutionParameter id="0"
                       name="UserName" value="user2"/>
                     <SubstitutionParameter id="1"
                       name="Password" value="password2"/>
                  </SubstitutionParameters>
               </MonitorSite>
               <MonitorSite siteId="880">
                  <SubstitutionParameters>
                     <SubstitutionParameter id="0"
                       name="UserName" value="user3"/>
                     <SubstitutionParameter id="1"
                       name="Password" value="password3"/>
                  </SubstitutionParameters>
               </MonitorSite>
               <MonitorSite siteId="884"/>
               <MonitorSite siteId="886"/>
            </MonitorSites>
         </ParameterizedMonitor>
      </GetParameterizedTestsResponse>
   </soap:Body>
</soap:Envelope>

In the response, there is one monitor for which two global substitution parameters were defined (UserName and Password). The monitor was deployed to four sites. Of those four sites, two had site-level parameter definitions overriding what was defined at the global level (sites 865 and 880).

More Sample Requests

The following request limits the output of the query to a specific monitor ID:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:GetParameterizedTestsRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <prov:ParameterizedTestFilter>
            <prov:MonitorId>326334</prov:MonitorId>
         </prov:ParameterizedTestFilter>
      </prov:GetParameterizedTestsRequest>
   </soapenv:Body>
</soapenv:Envelope>

The following request limits the output of the query by monitor status:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:GetParameterizedTestsRequest>
        <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <prov:ParameterizedTestFilter>
            <prov:MonitorStatus>Active</prov:MonitorStatus>
         </prov:ParameterizedTestFilter>
      </prov:GetParameterizedTestsRequest>
   </soapenv:Body>
</soapenv:Envelope>