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

TestRunItems_Load Operation

Applies to QAComplete 12.94 SaaS, last modified on December 06, 2021

Returns a test run item by its ID.

To specify a project that contains the test run item, use the ProjId value in the AuthenticationData object in the request body. To search for the test run item in several projects, use the ProjIds value to specify the list of projects IDs in the AuthenticationData object.

To get several or all test run items, use TestRunItems_LoadByCriteria.

Requirements

The authenticating user must belong to a user group that has the Read privilege for Test Library.

Parameters

The operation uses the following parameters:

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object with the login information and the ID of the project (or the list of project IDs) that contains the test.

TestRunItemId  :  integer, required

Unique identifier of the desired test run item.

Result

A TestRunItem object that represents the desired test run.

Example

Sample Code

C#

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

// Specifying the desired test run item
int ID = 1354;

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 test run item
TestRunItem testRunItem = service.TestRunItems_Load(authData, ID);
Console.WriteLine("Run of the test {0} at {1} is {2}", testRunItem.TestName, testRunItem.DateStarted, testRunItem.StatusCode);

Java

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

// Specifying the desired test run item
int ID = 1354;

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 test run item
TestRunItem testRunItem = service.testRunItemsLoad(authData, ID);
System.out.format("Run of the test %s at %s is %s%n", testRunItem.getTestName(), testRunItem.getDateStarted(), testRunItem.getStatusCode());

Sample Request XML

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

<?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>
    <TestRunItems_Load xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TestRunItemId>1354</TestRunItemId>
    </TestRunItems_Load>
  </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: 521 {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>
    <TestRunItems_Load xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TestRunItemId>1354</TestRunItemId>
    </TestRunItems_Load>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 1021 {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>
    <TestRunItems_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestRunItems_LoadResult>
        <TestRunItemId>1354</TestRunItemId>
        <TestSetId>254</TestSetId>
        <ProjId>10372</ProjId>
        <TestRunId>358</TestRunId>
        <TestId>468</TestId>
        <Version>2</Version>
        <Seq>1</Seq>
        <DateStarted>2014-07-29T13:24:18:027</DateStarted>
        <DateFinished>2014-07-29T13:26:31:069</DateFinished>
        <RunTime>134</RunTime>
        <RunTimeFormated>00:02:14</RunTimeFormated>
        <IsStoppedOnFail>N</IsStoppedOnFail>
        <RunByUserName>Doe, John</RunByUserName>
        <ConfigurationName>Windows 7 (32-bit)</ConfigurationName>
        <TestSetName>Regression Tests - Release 3.1.0</TestSetName>
        <AvgRunTime>139</AvgRunTime>
        <AvgRunTimeFormated>00:02:19</AvgRunTimeFormated>
        <TestName>Test input data</TestName>
      </TestRunItems_LoadResult>
    </TestRunItems_LoadResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1031 {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>
    <TestRunItems_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestRunItems_LoadResult>
        <TestRunItemId>1354</TestRunItemId>
        <TestSetId>254</TestSetId>
        <ProjId>10372</ProjId>
        <TestRunId>358</TestRunId>
        <TestId>468</TestId>
        <Version>2</Version>
        <Seq>1</Seq>
        <DateStarted>2014-07-29T13:24:18:027</DateStarted>
        <DateFinished>2014-07-29T13:26:31:069</DateFinished>
        <RunTime>134</RunTime>
        <RunTimeFormated>00:02:14</RunTimeFormated>
        <IsStoppedOnFail>N</IsStoppedOnFail>
        <RunByUserName>Doe, John</RunByUserName>
        <ConfigurationName>Windows 7 (32-bit)</ConfigurationName>
        <TestSetName>Regression Tests - Release 3.1.0</TestSetName>
        <AvgRunTime>139</AvgRunTime>
        <AvgRunTimeFormated>00:02:19</AvgRunTimeFormated>
        <TestName>Test input data</TestName>
      </TestRunItems_LoadResult>
    </TestRunItems_LoadResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

TestRuns_LoadByCriteria
TestRunItems_Update
Test Management Operations
Test Run Item Operations
SOAP API Reference

Highlight search results