AutomationTestItems_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 test item information with that from the specified AutomationTestItem object. Uninitialized properties are cleared.

First, you usually call AutomationTestItems_Load to get an automation test item by ID, change some of its properties, and then pass the updated object to AutomationTestItems_Update.

Requirements

The authenticating user must belong to a user group that has the Update privilege for Automation Test Items.

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 test item.

AutomationTestItem  :  AutomationTestItem, required

An AutomationTestItem object that contains updated information of the automation test item.

Result

None.

Example

Sample Code

C#

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

// Specifying the automating test item to update
int ID = 5;

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 test item
AutomationTestItem automationTestItem = service.AutomationTestItems_Load(authData, ID);

// Updating properties of the automation test item
automationTestItem.AutomationType = "TestExecute";
automationTestItem.FullPath = "\\\\Test-WinXPx86\\Work\\RegTests\\Release\\Beta\\Project.pjs";

// Updating the automation test item
service.AutomationTestItems_Update(authData, automationTestItem);
Console.WriteLine("The automation test item was updated");

Java

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

// Specifying the automating test item to update
int ID = 5;

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 test item
AutomationTestItem automationTestItem = service.automationTestItemsLoad(authData, ID);

// Updating properties of the automation test item
automationTestItem.setAutomationType("TestExecute");
automationTestItem.setFullPath("\\\\Test-WinXPx86\\Work\\RegTests\\Release\\Beta\\Project.pjs");

// Updating the automation test item
service.automationTestItemsUpdate(authData, automationTestItem);
System.out.format("Automation test item 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: 977 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/AutomationTestItems_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>
    <AutomationTestItems_Update xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationTestItem>
        <AutomationTestItemId>5</AutomationTestItemId>
        <AutomationHostId>1</AutomationHostId>
        <AutomationHostName>Test-WinXPx86</AutomationHostName>
        <TestName>Test input controls</TestName>
        <TestType>Automation Tests</TestType>
        <FullPath>\\Test-WinXPx86\Work\RegTests\Release\Beta\Project.pjs</FullPath>
        <AutomationType>TestExecute</AutomationType>
        <ProjId>10372</ProjId>
        <CreateUserId>24661</CreateUserId>
        <DateCreated>2014-07-29T13:24:18:027</DateCreated>
      </AutomationTestItem>
    </AutomationTestItems_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: 985 {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>
    <AutomationTestItems_Update xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationTestItem>
        <AutomationTestItemId>5</AutomationTestItemId>
        <AutomationHostId>1</AutomationHostId>
        <AutomationHostName>Test-WinXPx86</AutomationHostName>
        <TestName>Test input controls</TestName>
        <TestType>Automation Tests</TestType>
        <FullPath>\\Test-WinXPx86\Work\RegTests\Release\Beta\Project.pjs</FullPath>
        <AutomationType>TestExecute</AutomationType>
        <ProjId>10372</ProjId>
        <CreateUserId>24661</CreateUserId>
        <DateCreated>2014-07-29T13:24:18:027</DateCreated>
      </AutomationTestItem>
    </AutomationTestItems_Update>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 1226 {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>
    <AutomationTestItems_UpdateResponse xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationTestItem>
        <AutomationTestItemId>5</AutomationTestItemId>
        <AutomationHostId>1</AutomationHostId>
        <AutomationHostName>Test-WinXPx86</AutomationHostName>
        <TestName>Test input controls</TestName>
        <TestType>Automation Tests</TestType>
        <FullPath>\\Test-WinXPx86\Work\RegTests\Release\Beta\Project.pjs</FullPath>
        <Description>Test input controls and data</Description>
        <AutomationType>TestExecute</AutomationType>
        <ProjId>10372</ProjId>
      </AutomationTestItem>
    </AutomationTestItems_UpdateResponse>
  </soap:Body>
</soap:Envelope>

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1234 {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>
    <AutomationTestItems_UpdateResponse xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationTestItem>
        <AutomationTestItemId>5</AutomationTestItemId>
        <AutomationHostId>1</AutomationHostId>
        <AutomationHostName>Test-WinXPx86</AutomationHostName>
        <TestName>Test input controls</TestName>
        <TestType>Automation Tests</TestType>
        <FullPath>\\Test-WinXPx86\Work\RegTests\Release\Beta\Project.pjs</FullPath>
        <Description>Test input controls and data</Description>
        <AutomationType>TestExecute</AutomationType>
        <ProjId>10372</ProjId>
      </AutomationTestItem>
    </AutomationTestItems_UpdateResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

AutomationTestItems_Add
AutomationTestItems_Delete
AutomationTestItems_Load
AutomationTestItems_LoadByCriteria
AutomationTestItems_LoadByHostName
Automated Testing Bridge Operations
SOAP API Reference

Highlight search results