AutomationSchedules_IsTestsByTimeSpanExist Operation

Applies to QAComplete 14.5, last modified on August 06, 2024
This functionality is provided by the automated testing bridge that allows obtaining TestComplete test results to the QAComplete Automation screen.
Starting from the release 9.9.0, this functionality is obsolete and is supported only for backward compatibility.

Verifies whether there are any tests that use the specified host within the specified time span.

Parameters

The operation uses the following parameters:

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object containing the login information and the project ID that contains the automation schedule.

AutomationType  :  string, required

The automation type of tests which existence you want to check.

AutomationHostName  :  string, required

The name of the host the existence tests on which you want to check.

StartDate  :  dateTime, required

The start date of the time span that you are interested in. The specified date is not included in the time span.

EndDate  :  dateTime, required

The end date of the time span that you are interested in. The specified date is not included in the time span.

Result

It returns true if there is an automation test within the specified time span. Otherwise, it returns false.

Example

Sample Code

C#

string login = "[email protected]";
string password = "p@ssword";
int projID = 10372;

// Specifying the automation type of the test
string automationType = "TestComplete";
// Specifying the name of the host
string hostName = "Test-WinXPx86";
// Specifying the time span
DateTime startDate = new DateTime(2014, 08, 10);
DateTime endDate = new DateTime(2014, 08, 15);

ServiceSoapClient service = new ServiceSoapClient();

// Preparing AuthenticationData
LoginInfo loginInfo = service.GetLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.AppCode = loginInfo.AppCode;
authData.UserId = loginInfo.UserId;
authData.PassCode = password;
authData.DeptId = loginInfo.DeptId;
authData.ProjId = projID;

// Verifying whether there are tests in the specified time span
bool result = service.AutomationSchedules_IsTestsByTimeSpanExist(authData, automationType, hostName, startDate, endDate);
if (result)
{
  Console.WriteLine("There is at least one test in the specified time span");
}
else
{
  Console.WriteLine("There is not any test in the specified time span");
}

Java

String login = "[email protected]";
String password = "p@ssword";
int projID = 10372;

// Specifying the automation type of the test
String automationType = "TestComplete";
// Specifying the name of the host
String hostName = "Test-WinXPx86";
XMLGregorianCalendar startDate;
XMLGregorianCalendar endDate;

ServiceSoap service = new Service().getServiceSoap12();

// Preparing AuthenticationData
LoginInfo loginInfo = service.getLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.setAppCode(loginInfo.getAppCode());
authData.setUserId(loginInfo.getUserId());
authData.setPassCode(password);
authData.setDeptId(loginInfo.getDeptId());
authData.setProjId(projID);

try
{
  // Specifying the time span
  startDate = DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar(2014, 7, 10));
  endDate = DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar(2014, 7, 15));
  // Verifying whether there are tests in the specified time span
  Boolean result = service.automationSchedulesIsTestsByTimeSpanExist(authData, automationType, hostName, startDate, endDate);
  if (result)
  {
    System.out.println("There is at least one test in the specified time span");
  }
  else
  {
    System.out.println("There is not any test in the specified time span");
  }
}
catch (Exception e)
{
  e.printStackTrace();
}

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 707 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/AutomationSchedules_IsTestsByTimeSpanExist"
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AutomationSchedules_IsTestsByTimeSpanExist xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationType>TestComplete</AutomationType>
      <AutomationHostName>Test-WinXPx86</AutomationHostName>
      <StartDate>2014-08-10T00:00:00</StartDate>
      <EndDate>2014-08-15T00:00:00</EndDate>
    </AutomationSchedules_IsTestsByTimeSpanExist>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 715 {Insert an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <AutomationSchedules_IsTestsByTimeSpanExist xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationType>TestComplete</AutomationType>
      <AutomationHostName>Test-WinXPx86</AutomationHostName>
      <StartDate>2014-08-10T00:00:00</StartDate>
      <EndDate>2014-08-15T00:00:00</EndDate>
    </AutomationSchedules_IsTestsByTimeSpanExist>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 747 {The server returns an appropriate value here}


<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AutomationSchedules_IsTestsByTimeSpanExistResponse xmlns="http://www.pragmaticsw.com/">
      <AutomationSchedules_IsTestsByTimeSpanExistResult>true</AutomationSchedules_IsTestsByTimeSpanExistResult>
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
    </AutomationSchedules_IsTestsByTimeSpanExistResponse>
  </soap:Body>
</soap:Envelope>

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 753 {The server returns an appropriate value here}


<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <AutomationSchedules_IsTestsByTimeSpanExistResponse xmlns="http://www.pragmaticsw.com/">
      <AutomationSchedules_IsTestsByTimeSpanExistResult>true</AutomationSchedules_IsTestsByTimeSpanExistResult>
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
    </AutomationSchedules_IsTestsByTimeSpanExistResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

AutomationSchedules_Add
AutomationSchedules_Delete
AutomationSchedules_Load
AutomationSchedules_LoadByCriteria
AutomationSchedules_LoadTestsByTimeSpan
AutomationSchedules_Update
Automated Testing Bridge Operations
SOAP API Reference

Highlight search results