TestRunResults_Load Operation

Applies to QAComplete 12.90 SaaS & On-Premises, last modified on September 09, 2021

Returns a test run result by its ID.

To specify a project that contains the test run result, use the ProjId value in the AuthenticationData object in the request body. To search for the test run result 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 results, use TestRunResults_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 result.

TestRunResultId  :  integer, required

Unique identifier of the desired test run result.

Result

A TestRunResult object that represents the desired result of the performing a test step.

Example

Sample Code

C#

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

// Specifying the desired test run result
int ID = 2157;

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 result
TestRunResult testRunResult = service.TestRunResults_Load(authData, ID);
Console.WriteLine("Run of the test step {0} is {1} with actual results: {2}", testRunResult.Step, testRunResult.StatusCode, testRunResult.ActualResult);

Java

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

// Specifying the desired test run result
int ID = 2157;

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 result
TestRunResult testRunResult = service.testRunResultsLoad(authData, ID);
System.out.format("Run of the test step %s is %s with actual results: %s%n", testRunResult.getStep(), testRunResult.getStatusCode(), testRunResult.getActualResult());

Sample Request XML

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

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 756 {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>
    <TestRunResults_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestRunResults_LoadResult>
        <TestRunResultId>2157</TestRunResultId>
        <TestRunItemId>1354</TestRunItemId>
        <Seq>1</Seq>
        <StatusCode>Failed</StatusCode>
        <Step>Select Tools from the application's main menu.</Step>
        <ExpectedResults>The Tools dialog opens.</ExpectedResults>
        <ActualResults>An error occurred when you click <b>Tools</b>.</ActualResults>
        <TestStepId>10</TestStepId>
        <ProjId>10372</ProjId>
      </TestRunResults_LoadResult>
    </TestRunResults_LoadResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 766 {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>
    <TestRunResults_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestRunResults_LoadResult>
        <TestRunResultId>2157</TestRunResultId>
        <TestRunItemId>1354</TestRunItemId>
        <Seq>1</Seq>
        <StatusCode>Failed</StatusCode>
        <Step>Select Tools from the application's main menu.</Step>
        <ExpectedResults>The Tools dialog opens.</ExpectedResults>
        <ActualResults>An error occurred when you click <b>Tools</b>.</ActualResults>
        <TestStepId>10</TestStepId>
        <ProjId>10372</ProjId>
      </TestRunResults_LoadResult>
    </TestRunResults_LoadResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

TestRunResults_LoadByCriteria
TestRunResults_Update
Test Management Operations
Test Run Results Operations
SOAP API Reference

Highlight search results