TestCases_Load Operation

Applies to QAComplete 14.3, last modified on February 19, 2024
This topic relates to the legacy Test Cases screen that provided basic test management functionality and was replaced with Test Management.
Starting from release 9.7.0, this functionality is obsolete and is supported only for backward compatibility.

Returns a test case by its ID.

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

To get several or all test cases, use TestCases_LoadByCriteria. Also, you can get all test sets that use the same automation script using TestCases_LoadByUNC.

Requirements

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

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 case.

TestCaseId  :  integer, required

The ID of the desired test case.

Result

A TestCase object that represents the needed test case.

Example

Sample Code

C#

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

// Specifying the desired test case
int ID = 11;

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 case
TestCase testCase = service.TestCases_Load(authData, ID);
Console.WriteLine("{0}: {1}", testCase.Title, testCase.StatusCode);

Java

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

// Specifying the desired test case
int ID = 13;

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 case
TestCase testCase = service.testCasesLoad(authData, ID);
System.out.format("%s: %s%n", testCase.getTitle(), testCase.getStatusCode());

Sample Request XML

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

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 646 {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>
    <TestCases_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestCases_LoadResult>
        <OwnerUserId>27572</OwnerUserId>
        <PctComplete>100</PctComplete>
        <ActHrs>0.000</ActHrs>
        <EstHrsRemaining>0.000</EstHrsRemaining>
        <ImportId>0</ImportId>
        <NbrFiles>0</NbrFiles>
        <NbrNotes>0</NbrNotes>
        <NbrTasks>0</NbrTasks>
        <OwnerName>Davis, Eugeny</OwnerName>
        <ProjId>17823</ProjId>
      </TestCases_LoadResult>
    </TestCases_LoadResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 656 {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>
    <TestCases_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestCases_LoadResult>
        <OwnerUserId>27572</OwnerUserId>
        <PctComplete>100</PctComplete>
        <ActHrs>0.000</ActHrs>
        <EstHrsRemaining>0.000</EstHrsRemaining>
        <ImportId>0</ImportId>
        <NbrFiles>0</NbrFiles>
        <NbrNotes>0</NbrNotes>
        <NbrTasks>0</NbrTasks>
        <OwnerName>Davis, Eugeny</OwnerName>
        <ProjId>17823</ProjId>
      </TestCases_LoadResult>
    </TestCases_LoadResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

TestCases_Add
TestCases_Delete
TestCases_LoadByCriteria
TestCases_LoadByUNC
TestCases_Update
Test Cases Operations (Releases 9.6.0 and Earlier)
SOAP API Reference

Highlight search results