Join Wintertainment 2021 to share your stories, have fun, earn community badges, and more!

AutomationSchedules_Add Operation

Applies to QAComplete 12.94 SaaS, last modified on December 06, 2021
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.

Adds a new automation schedule item to your project and returns the ID of the added item.

Requirements

The authenticating user must belong to a user group that has the Add privilege for AutomationSchedules.

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.

AutomationSchedule  :  AutomationSchedule, required

An AutomationSchedule object that contains information on the automation schedule that you want to add to the project.

Result

An integer ID of the created automation test item.

Example

Sample Code

C#

string login = "john.doe@example.com";
string password = "p@ssword";
int projID = 10372;

ServiceSoapClient service = new ServiceSoapClient();

// Preparing AuthenticationData
int projId = 10372;
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;
AutomationSchedule automationSchedule = new AutomationSchedule();
automationSchedule.AutomationTestItemId = 5;
automationSchedule.DateBegin = new DateTime(2014, 08, 10);
automationSchedule.DateEnd = new DateTime(2014, 08, 15);
automationSchedule.DaysRun = 5;
automationSchedule.TimeRun = "10:00 AM";
automationSchedule.Status = "Pending";
automationSchedule.ProjId = projId;

// Adding the automation schedule
int Id = service.AutomationSchedules_Add(authData, automationSchedule);
Console.WriteLine("ID of the added schedule: {0}", Id);

Java

String login = "john.doe@example.com";
String password = "p@ssword";
int projId = 10372;

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);

// Preparing the AutomationSchedule object
AutomationSchedule automationSchedule = new AutomationSchedule();
automationSchedule.setAutomationTestItemId(5);
automationSchedule.setDaysRun((short)5);
automationSchedule.setTimeRun("10:00 AM");
automationSchedule.setStatus("Pending");
automationSchedule.setProjId(projId);
XMLGregorianCalendar dateBegin;
XMLGregorianCalendar dateEnd;
try
{
  dateBegin = DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar(2014, 8, 10));
  dateEnd = DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar(2014, 8, 15));
  automationSchedule.setDateBegin(dateBegin);
  automationSchedule.setDateEnd(dateEnd);
}
catch (Exception e){
  e.printStackTrace();
}

// Adding the automation schedule
int automationScheduleId = service.automationSchedulesAdd(authData, automationSchedule);
System.out.format("The ID of the created schedule: %d%n", automationScheduleId);

Sample Request XML

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

<?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_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationSchedule>
        <AutomationTestItemId>5</AutomationTestItemId>
        <DateBegin>2014-08-10T00:00:00</DateBegin>
        <DateEnd>2014-08-15T00:00:00</DateEnd>
        <DaysRun>5</DaysRun>
        <TimeRun>10:00 AM</TimeRun>
        <Status>Pending</Status>
        <ProjId>10372</ProjId>
        <TestType>pjs</TestType>
        <AutomationType></AutomationType>
      </AutomationSchedule>
    </AutomationSchedules_Add>
  </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: 815 {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_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationSchedule>
        <AutomationTestItemId>5</AutomationTestItemId>
        <DateBegin>2014-08-10T00:00:00</DateBegin>
        <DateEnd>2014-08-15T00:00:00</DateEnd>
        <DaysRun>5</DaysRun>
        <TimeRun>10:00 AM</TimeRun>
        <Status>Pending</Status>
        <ProjId>10372</ProjId>
        <TestType>pjs</TestType>
        <AutomationType></AutomationType>
      </AutomationSchedule>
    </AutomationSchedules_Add>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 1007 {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_AddResponse xmlns="http://www.pragmaticsw.com/">
      <AutomationSchedules_AddResult>
        <AutomationScheduleId>4</AutomationScheduleId>
        <AutomationTestItemId>5</AutomationTestItemId>
        <DateBegin>2014-08-10T00:00:00</DateBegin>
        <DateEnd>2014-08-15T00:00:00</DateEnd>
        <DaysRun>5</DaysRun>
        <TimeRun>10:00 AM</TimeRun>
        <Status>Pending</Status>
        <ProjId>10372</ProjId>
        <CreateUserId>24661</CreateUserId>
        <UpdateUserId>24661</UpdateUserId>
        <DateCreated>2014-08-04T21:12:13:024</DateCreated>
        <DateUpdated>2014-08-04T21:12:13:024</DateUpdated>
        <RunASAP>false</RunASAP>
        <TestType>pjs</TestType>
        <AutomationType>TestComplete</AutomationType>
        <SuitePath>\\Test-WinXPx86\Work\Tests\Release\Project.pjs</SuitePath>
      </AutomationSchedules_AddResult>
    </AutomationSchedules_AddResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1017 {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_AddResponse xmlns="http://www.pragmaticsw.com/">
      <AutomationSchedules_AddResult>
        <AutomationScheduleId>4</AutomationScheduleId>
        <AutomationTestItemId>5</AutomationTestItemId>
        <DateBegin>2014-08-10T00:00:00</DateBegin>
        <DateEnd>2014-08-15T00:00:00</DateEnd>
        <DaysRun>5</DaysRun>
        <TimeRun>10:00 AM</TimeRun>
        <Status>Pending</Status>
        <ProjId>10372</ProjId>
        <CreateUserId>24661</CreateUserId>
        <UpdateUserId>24661</UpdateUserId>
        <DateCreated>2014-08-04T21:12:13:024</DateCreated>
        <DateUpdated>2014-08-04T21:12:13:024</DateUpdated>
        <RunASAP>false</RunASAP>
        <TestType>pjs</TestType>
        <AutomationType>TestComplete</AutomationType>
        <SuitePath>\\Test-WinXPx86\Work\Tests\Release\Project.pjs</SuitePath>
      </AutomationSchedules_AddResult>
    </AutomationSchedules_AddResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

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

Highlight search results