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. |
Use the AutomationTestItems_LoadByHostName
operation to get automation test items that use a specific host.
To specify the project to get automation test items from, use the ProjId
value in the AuthenticationData
object in the request body.
To get just one test run, use AutomationTestItems_Load
. Also, you can use AutomationTestItems_LoadByCriteria
to get automation test items that meet specific conditions.
Requirements
The authenticating user must belong to a user group that has the Read privilege for Automation test items.
Parameters
The operation uses the following parameters:
AuthenticationData : AuthenticationData, required
An AuthenticationData
object with the login information and the ID of the project that contains the automation test items.
HostName : string, required
QAComplete selects all automation test items that use specified host.
Result
An array of AutomationTestItem
objects that represent automation test items.
Example
Sample Code
C#
string login = "[email protected]";
string password = "p@ssword";
int projID = 10372;
// Specifying the host name
string hostName = "Test-WinXPx86";
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 AutomationTestItem objects
AutomationTestItem[] automationTestItems = service.AutomationTestItems_LoadByHostName(authData, hostName);
foreach (AutomationTestItem automationTestItem in automationTestItems)
{
Console.WriteLine("Loaded automation test item: {0}", automationTestItem.TestName);
}
Java
String login = "[email protected]";
String password = "p@ssword";
int projID = 10372;
// Specifying the host name
String hostName = "Test-WinXPx86";
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 AutomationTestItem objects
ArrayOfAutomationTestItem automationTestItems = service.automationTestItemsLoadByHostName(authData, hostName);
for (AutomationTestItem automationTestItem : automationTestItems.getAutomationTestItem())
{
System.out.format("Loaded automation test item: %s%n", automationTestItem.getTestName());
}
Sample Request XML
POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 533 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/AutomationTestItems_LoadByHostName"
<?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_LoadByHostName xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>7154</DeptId>
<ProjId>1032</ProjId>
<UserId>25315</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<HostName></HostName>
</AutomationTestItems_LoadByHostName>
</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: 541 {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_LoadByHostName xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>7154</DeptId>
<ProjId>1032</ProjId>
<UserId>25315</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<HostName></HostName>
</AutomationTestItems_LoadByHostName>
</soap12:Body>
</soap12:Envelope>
Sample Response XML
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 2283 {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_LoadByHostNameResponse xmlns="http://www.pragmaticsw.com/">
<AutomationTestItems_LoadByHostNameResult>
<AutomationTestItem>
<AutomationTestItemId>5</AutomationTestItemId>
<AutomationHostId>1</AutomationHostId>
<AutomationHostName>Test-WinXPx86</AutomationHostName>
<TestName>Test input controls</TestName>
<TestType>Automation Tests</TestType>
<FullPath>\\Test-WinXPx86\Work\Tests\Release\Project.pjs</FullPath>
<Description>Test input controls and data</Description>
<AutomationType>TestComplete</AutomationType>
<ProjId>10372</ProjId>
<CreateUserId>24661</CreateUserId>
<UpdateUserId>24661</UpdateUserId>
<DateCreated>2014-07-29T13:24:18:027</DateCreated>
<DateUpdated>2014-07-29T13:24:18:027</DateUpdated>
</AutomationTestItem>
<AutomationTestItem>
<AutomationTestItemId>6</AutomationTestItemId>
<AutomationHostId>1</AutomationHostId>
<AutomationHostName>Test-WinXPx86</AutomationHostName>
<TestName>Test new controls</TestName>
<TestType>Automation Tests</TestType>
<FullPath>\\Test-WinXPx86\Work\Tests\Release\Project.pjs</FullPath>
<Description>Test new controls</Description>
<AutomationType>TestExecute</AutomationType>
<ProjId>10372</ProjId>
<CreateUserId>24661</CreateUserId>
<UpdateUserId>24661</UpdateUserId>
<DateCreated>2014-07-27T17:18:24:014</DateCreated>
<DateUpdated>2014-07-29T14:05:36:042</DateUpdated>
</AutomationTestItem>
</AutomationTestItems_LoadByHostNameResult>
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>7154</DeptId>
<ProjId>1032</ProjId>
<UserId>25315</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
</AutomationTestItems_LoadByHostNameResponse>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 2291 {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_LoadByHostNameResponse xmlns="http://www.pragmaticsw.com/">
<AutomationTestItems_LoadByHostNameResult>
<AutomationTestItem>
<AutomationTestItemId>5</AutomationTestItemId>
<AutomationHostId>1</AutomationHostId>
<AutomationHostName>Test-WinXPx86</AutomationHostName>
<TestName>Test input controls</TestName>
<TestType>Automation Tests</TestType>
<FullPath>\\Test-WinXPx86\Work\Tests\Release\Project.pjs</FullPath>
<Description>Test input controls and data</Description>
<AutomationType>TestComplete</AutomationType>
<ProjId>10372</ProjId>
<CreateUserId>24661</CreateUserId>
<UpdateUserId>24661</UpdateUserId>
<DateCreated>2014-07-29T13:24:18:027</DateCreated>
<DateUpdated>2014-07-29T13:24:18:027</DateUpdated>
</AutomationTestItem>
<AutomationTestItem>
<AutomationTestItemId>6</AutomationTestItemId>
<AutomationHostId>1</AutomationHostId>
<AutomationHostName>Test-WinXPx86</AutomationHostName>
<TestName>Test new controls</TestName>
<TestType>Automation Tests</TestType>
<FullPath>\\Test-WinXPx86\Work\Tests\Release\Project.pjs</FullPath>
<Description>Test new controls</Description>
<AutomationType>TestExecute</AutomationType>
<ProjId>10372</ProjId>
<CreateUserId>24661</CreateUserId>
<UpdateUserId>24661</UpdateUserId>
<DateCreated>2014-07-27T17:18:24:014</DateCreated>
<DateUpdated>2014-07-29T14:05:36:042</DateUpdated>
</AutomationTestItem>
</AutomationTestItems_LoadByHostNameResult>
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>7154</DeptId>
<ProjId>1032</ProjId>
<UserId>25315</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
</AutomationTestItems_LoadByHostNameResponse>
</soap12:Body>
</soap12:Envelope>
See Also
AutomationTestItems_Add
AutomationTestItems_Delete
AutomationTestItems_Load
AutomationTestItems_LoadByCriteria
AutomationTestItems_Update
Automated Testing Bridge Operations
SOAP API Reference