AutomationSchedules_Update 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.

Replaces the automation schedule information with that from the specified AutomationSchedule object. Uninitialized properties are cleared.

First, you usually call AutomationSchedules_Load to get an automation schedule by ID, change some of its properties, and then pass the updated object to AutomationSchedules_Update.

Requirements

The authenticating user must belong to a user group that has the Update 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 updated information of the automation schedule.

Result

None.

Example

Sample Code

C#

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

// Specifying the automating schedule to update
int ID = 4;

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;

// Loading the automation schedule
AutomationSchedule automationSchedule = service.AutomationSchedules_Load(authData, ID);

// Updating properties of the automation schedule
automationSchedule.DateBegin = new DateTime(2014, 08, 12);
automationSchedule.DateEnd = new DateTime(2014, 08, 20);
automationSchedule.DaysRun = 8;
automationSchedule.TimeRun = "10:00 PM";
automationSchedule.Status = "Approved";
automationSchedule.SuitePath = "\\\\Test-WinXPx86\\Work\\RegTests\\Release\\Beta\\Project.pjs";

// Updating the automation schedule
service.AutomationSchedules_Update(authData, automationSchedule);
Console.WriteLine("The automation schedule was updated");

Java

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

// Specifying the automating schedule to update
int ID = 4;

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

// Loading the automation schedule
AutomationSchedule automationSchedule = service.automationSchedulesLoad(authData, ID);

// Updating properties of the automation schedule
automationSchedule.setAutomationTestItemId(5);
automationSchedule.setDaysRun((short)8);
automationSchedule.setTimeRun("10:00 PM");
automationSchedule.setStatus("Approved");
automationSchedule.setSuitePath("\\\\Test-WinXPx86\\Work\\RegTests\\Release\\Beta\\Project.pjs");
XMLGregorianCalendar dateBegin;
XMLGregorianCalendar dateEnd;
try
{
  dateBegin = DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar(2014, 8, 12));
  dateEnd = DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar(2014, 8, 20));
  automationSchedule.setDateBegin(dateBegin);
  automationSchedule.setDateEnd(dateEnd);
}
catch (Exception e){
  e.printStackTrace();
}

// Updating the automation schedule
service.automationSchedulesUpdate(authData, automationSchedule);
System.out.format("Automation schedule was updated");

Sample Request XML

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

<?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_Update xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationSchedule>
        <AutomationScheduleId>4</AutomationScheduleId>
        <AutomationTestItemId>5</AutomationTestItemId>
        <DateBegin>2014-08-12T00:00:00</DateBegin>
        <DateEnd>2014-08-20T00:00:00</DateEnd>
        <DaysRun>8</DaysRun>
        <TimeRun>10:00 PM</TimeRun>
        <Status>Approved</Status>
        <ProjId>10372</ProjId>
        <CreateUserId>24661</CreateUserId>
        <DateCreated>2014-08-10T12:57:25:024</DateCreated>
        <RunASAP>false</RunASAP>
        <TestName>Test input controls</TestName>
        <TestType>pjs</TestType>
        <AutomationType>TestComplete</AutomationType>
        <SuitePath>\\Test-WinXPx86\Work\RegTests\Release\Beta\Project.pjs</SuitePath>
      </AutomationSchedule>
    </AutomationSchedules_Update>
  </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: 1105 {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_Update xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationSchedule>
        <AutomationScheduleId>4</AutomationScheduleId>
        <AutomationTestItemId>5</AutomationTestItemId>
        <DateBegin>2014-08-12T00:00:00</DateBegin>
        <DateEnd>2014-08-20T00:00:00</DateEnd>
        <DaysRun>8</DaysRun>
        <TimeRun>10:00 PM</TimeRun>
        <Status>Approved</Status>
        <ProjId>10372</ProjId>
        <CreateUserId>24661</CreateUserId>
        <DateCreated>2014-08-10T12:57:25:024</DateCreated>
        <RunASAP>false</RunASAP>
        <TestName>Test input controls</TestName>
        <TestType>pjs</TestType>
        <AutomationType>TestComplete</AutomationType>
        <SuitePath>\\Test-WinXPx86\Work\RegTests\Release\Beta\Project.pjs</SuitePath>
      </AutomationSchedule>
    </AutomationSchedules_Update>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 1420 {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_UpdateResponse xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationSchedule>
        <AutomationScheduleId>4</AutomationScheduleId>
        <AutomationTestItemId>5</AutomationTestItemId>
        <DateBegin>2014-08-12T00:00:00</DateBegin>
        <DateEnd>2014-08-20T00:00:00</DateEnd>
        <DaysRun>8</DaysRun>
        <TimeRun>10:00 PM</TimeRun>
        <Status>Approved</Status>
        <ProjId>10372</ProjId>
        <CreateUserId>24661</CreateUserId>
        <UpdateUserId>24661</UpdateUserId>
        <DateCreated>2014-08-04T21:12:13:024</DateCreated>
        <DateUpdated>2014-08-07T12:18:35:015</DateUpdated>
        <RunASAP>false</RunASAP>
        <TestType>pjs</TestType>
        <AutomationType>TestComplete</AutomationType>
        <SuitePath>\\Test-WinXPx86\Work\RegTests\Release\Beta\Project.pjs</SuitePath>
      </AutomationSchedule>
    </AutomationSchedules_AddResponse>
  </soap:Body>
</soap:Envelope>

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1428 {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>5</AutomationSchedules_AddResult>
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationSchedule>
        <AutomationScheduleId>4</AutomationScheduleId>
        <AutomationTestItemId>5</AutomationTestItemId>
        <DateBegin>2014-08-12T00:00:00</DateBegin>
        <DateEnd>2014-08-20T00:00:00</DateEnd>
        <DaysRun>8</DaysRun>
        <TimeRun>10:00 PM</TimeRun>
        <Status>Approved</Status>
        <ProjId>10372</ProjId>
        <CreateUserId>24661</CreateUserId>
        <UpdateUserId>24661</UpdateUserId>
        <DateCreated>2014-08-04T21:12:13:024</DateCreated>
        <DateUpdated>2014-08-07T12:18:35:015</DateUpdated>
        <RunASAP>false</RunASAP>
        <TestType>pjs</TestType>
        <AutomationType>TestComplete</AutomationType>
        <SuitePath>\\Test-WinXPx86\Work\RegTests\Release\Beta\Project.pjs</SuitePath>
      </AutomationSchedule>
    </AutomationSchedules_AddResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

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

Highlight search results