TestRuns_Load Operation

Applies to QAComplete 12.84 SaaS, last modified on July 19, 2021

Returns a test run by its ID.

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

To get several or all test runs, use TestRuns_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.

TestRunId  :  integer, required

Unique identifier of the desired test run.

Result

A TestRun 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
int ID = 358;

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
TestRun testRun = service.TestRuns_Load(authData, ID);
Console.WriteLine("Run test set {0} at {1} is {2}", testRun.TestSetName, testRun.DateStarted, testRun.StatusCode);

Java

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

// Specifying the desired ID
int ID = 358;

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
TestRun testRun = service.testRunsLoad(authData, ID);
System.out.format("Run of a %s test set at %s was %s%n", testRun.getTestSetName(), testRun.getDateStarted(), testRun.getStatusCode());

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 495 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/TestRuns_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>
    <TestRuns_Load xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TestRunId>64</TestRunId>
    </TestRuns_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: 503 {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>
    <TestRuns_Load xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TestRunId>64</TestRunId>
    </TestRuns_Load>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 1065 {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>
    <TestRuns_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestRuns_LoadResult>
        <TestRunId>358</TestRunId>
        <TestSetId>0</TestSetId>
        <TestConfigId>24</TestConfigId>
        <ConfigurationName>Windows 7 (32-bit)</ConfigurationName>
        <ReleaseId>14</ReleaseId>
        <ProjId>10372</ProjId>
        <RunByUserId>27942</RunByUserId>
        <RunByUserName>Doe, John</RunByUserName>
        <IsSequential>N</IsSequential>
        <StatusCode>Awaiting Run</StatusCode>
        <ExecutionType>Manual</ExecutionType>
        <DateStarted>2014-07-29T13:24:18:027</DateStarted>
        <DateFinished>0001-01-01T00:00:00</DateFinished>
        <NbrTests>1</NbrTests>
        <NbrPassed>0</NbrPassed>
        <NbrFailed>0</NbrFailed>
        <NbrBlocked>0</NbrBlocked>
        <NbrAwaitingRun>1</NbrAwaitingRun>
        <RunTime>0</RunTime>
        <RunTimeFormated>00:00:00</RunTimeFormated>
        <TestId>2112</TestId>
        <HostId>167</HostId>
      </TestRuns_LoadResult>
    </TestRuns_LoadResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1075 {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>
    <TestRuns_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestRuns_LoadResult>
        <TestRunId>358</TestRunId>
        <TestSetId>0</TestSetId>
        <TestConfigId>24</TestConfigId>
        <ConfigurationName>Windows 7 (32-bit)</ConfigurationName>
        <ReleaseId>14</ReleaseId>
        <ProjId>10372</ProjId>
        <RunByUserId>27942</RunByUserId>
        <RunByUserName>Doe, John</RunByUserName>
        <IsSequential>N</IsSequential>
        <StatusCode>Awaiting Run</StatusCode>
        <ExecutionType>Manual</ExecutionType>
        <DateStarted>2014-07-29T13:24:18:027</DateStarted>
        <DateFinished>0001-01-01T00:00:00</DateFinished>
        <NbrTests>1</NbrTests>
        <NbrPassed>0</NbrPassed>
        <NbrFailed>0</NbrFailed>
        <NbrBlocked>0</NbrBlocked>
        <NbrAwaitingRun>1</NbrAwaitingRun>
        <RunTime>0</RunTime>
        <RunTimeFormated>00:00:00</RunTimeFormated>
        <TestId>2112</TestId>
        <HostId>167</HostId>
      </TestRuns_LoadResult>
    </TestRuns_LoadResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

TestRuns_Add
TestRuns_LoadByCriteria
TestRuns_Update
Test Management Operations
Test Run Operations
SOAP API Reference

Highlight search results