TestSteps_Load Operation

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

Returns the TestStep object that describes the desired test step specified by its ID.

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

Requirements

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

Parameters

The operation uses the following parameters:

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 whose step you want to get.

TestStepId  :  integer, required

The ID of the step that belongs to a test in the Test Library.

Result

The TestStep object that stores information on the needed test step.

Example

Sample Code

C#

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

ServiceSoapClient service = new ServiceSoapClient();

// Prepare 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 = loginInfo.ProjId;

// ID of the desired test step
int stepId = 10;

// Get the test step
TestStep step = service.TestSteps_Load(authData, stepId);
Console.WriteLine(step.Step);

Java

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

ServiceSoap service = new Service().getServiceSoap12();

// Prepare 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(loginInfo.getProjId());

// ID of the desired test step
int stepId = 10;

// Get the step
TestStep step = new TestStep();
step = service.testStepsLoad(authData, stepId);

System.out.println(step.getStep());

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 500 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/TestSteps_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>
    <TestSteps_Load xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>8162</DeptId>
        <ProjId>11873</ProjId>
        <UserId>24661</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TestStepId>10</TestStepId>
    </TestSteps_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: 508 {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>
    <TestSteps_Load xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>8162</DeptId>
        <ProjId>11873</ProjId>
        <UserId>24661</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TestStepId>10</TestStepId>
    </TestSteps_Load>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 859 {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>
    <TestSteps_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestSteps_LoadResult>
        <TestId>1</TestId>
        <TestStepId>10</TestStepId>
        <Title>Test Tools dialog</Title>
        <Seq>1</Seq>
        <IsStoppedOnFail>Y</IsStoppedOnFail>
        <Step>Select Tools from the application's main menu.</Step>
        <ExpectedResults>The Tools dialog opens.</ExpectedResults>
        <DateCreated>2014-07-18T08:00:00</DateCreated>
        <DateUpdated>2014-07-21T10:30:00</DateUpdated>
        <CreateUserId>24661</CreateUserId>
        <UpdateUserId>24661</UpdateUserId>
        <ScriptName></ScriptName>
        <NbrFiles>0</NbrFiles>
        <ScriptSourceId>0</ScriptSourceId>
      </TestSteps_LoadResult>
    </TestSteps_LoadResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 869 {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>
    <TestSteps_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <TestSteps_LoadResult>
        <TestId>1</TestId>
        <TestStepId>10</TestStepId>
        <Title>Test Tools dialog</Title>
        <Seq>1</Seq>
        <IsStoppedOnFail>Y</IsStoppedOnFail>
        <Step>Select Tools from the application's main menu.</Step>
        <ExpectedResults>The Tools dialog opens.</ExpectedResults>
        <DateCreated>2014-07-18T08:00:00</DateCreated>
        <DateUpdated>2014-07-21T10:30:00</DateUpdated>
        <CreateUserId>24661</CreateUserId>
        <UpdateUserId>24661</UpdateUserId>
        <ScriptName></ScriptName>
        <NbrFiles>0</NbrFiles>
        <ScriptSourceId>0</ScriptSourceId>
      </TestSteps_LoadResult>
    </TestSteps_LoadResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

TestSteps_Add
TestSteps_Delete
TestSteps_LoadByCriteria
TestSteps_Update
Test Management Operations
Test Step Operations
SOAP API Reference

Highlight search results