Tests_Load Operation

Applies to QAComplete 14.5, last modified on August 06, 2024
Since release 10.2, this functionality is obsolete and is supported for backward compatibility only. We recommend that you use QAComplete REST API to access and manage data in QAComplete.

Returns the Test object containing information on the test specified by its ID.

To specify a project that contains the test, use the ProjId value in the AuthenticationData object in the request body. To search for the test 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) whose test you want to get.

TestId  :  integer, required

The ID of the test in the Test Library in QAComplete.

Result

The Test object that stores information on the needed test.

Example

Sample Code

C#

string login = "[email protected]";
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
int testId = 2;

// Get the test
Test test = service.Tests_Load(authData, testId);
Console.WriteLine(test.Title);

Java

String login = "[email protected]";
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
int testId = 25;

// Get the test
Test test = new Test();
test = service.testsLoad(authData, testId);

System.out.println(test.getTitle());

Sample Request XML

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

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 1843 {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>
    <Tests_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <Tests_LoadResult>
        <FolderName>Regression Tests</FolderName>
        <AssignedToName>Doe, John</AssignedToName>
        <UserName>Doe, John</UserName>
        <OwnerName>Doe, John</OwnerName>
        <LastRunByName>Doe, John</LastRunByName>
        <TestId>2</TestId>
        <Version>3</Version>
        <ProjId>11873</ProjId>
        <FolderId>12</FolderId>
        <Title>Test input data</Title>
        <IsActive>Y</IsActive>
        <StatusCode>Approved</StatusCode>
        <ExecutionType>Manual</ExecutionType>
        <TestType>Regression</TestType>
        <Priority>1-High</Priority>
        <Description>Test input data</Description>
        <DateCreated>2014-07-17T08:30:28</DateCreated>
        <DateUpdated>2014-07-20T10:53:07</DateUpdated>
        <CreateUserId>24661</CreateUserId>
        <UpdateUserId>24661</UpdateUserId>
        <AssigneeUserId>24661</AssigneeUserId>
        <OwnerUserId>24661</OwnerUserId>
        <OriginalId>0</OriginalId>
        <ImportId>0</ImportId>
        <ScriptSourceId>0</ScriptSourceId>
        <NbrFailStatus>2</NbrFailStatus>
        <NbrPassStatus>4</NbrPassStatus>
        <AvgRunTime>375</AvgRunTime>
        <AvgRunTimeFormated>00:06:15</AvgRunTimeFormated>
        <NbrTimesRun>6</NbrTimesRun>
        <LastRunByUserId>24661</LastRunByUserId>
        <LastRunTestSet>2</LastRunTestSet>
        <LastRunTestSetTitle>Regression Tests</LastRunTestSetTitle>
        <LastRunDate>2014-07-20T10:53:07</LastRunDate>
        <LastRunStatus>Passed</LastRunStatus>
        <NbrSteps>10</NbrSteps>
        <NbrEscalations>0</NbrEscalations>
        <DateLastEscalated>0001-01-01T00:00:00</DateLastEscalated>
        <LastEscalationRuleId>0</LastEscalationRuleId>
        <NbrFilesNotSecured>0</NbrFilesNotSecured>
        <NbrFiles>0</NbrFiles>
        <NbrNotes>0</NbrNotes>
        <NbrEvents>0</NbrEvents>
        <ScriptName></ScriptName>
      </Tests_LoadResult>
    </Tests_LoadResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1853 {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>
    <Tests_LoadResponse xmlns="http://www.pragmaticsw.com/">
      <Tests_LoadResult>
        <FolderName>Regression Tests</FolderName>
        <AssignedToName>Doe, John</AssignedToName>
        <UserName>Doe, John</UserName>
        <OwnerName>Doe, John</OwnerName>
        <LastRunByName>Doe, John</LastRunByName>
        <TestId>2</TestId>
        <Version>3</Version>
        <ProjId>11873</ProjId>
        <FolderId>12</FolderId>
        <Title>Test input data</Title>
        <IsActive>Y</IsActive>
        <StatusCode>Approved</StatusCode>
        <ExecutionType>Manual</ExecutionType>
        <TestType>Regression</TestType>
        <Priority>1-High</Priority>
        <Description>Test input data</Description>
        <DateCreated>2014-07-17T08:30:28</DateCreated>
        <DateUpdated>2014-07-20T10:53:07</DateUpdated>
        <CreateUserId>24661</CreateUserId>
        <UpdateUserId>24661</UpdateUserId>
        <AssigneeUserId>24661</AssigneeUserId>
        <OwnerUserId>24661</OwnerUserId>
        <OriginalId>0</OriginalId>
        <ImportId>0</ImportId>
        <ScriptSourceId>0</ScriptSourceId>
        <NbrFailStatus>2</NbrFailStatus>
        <NbrPassStatus>4</NbrPassStatus>
        <AvgRunTime>375</AvgRunTime>
        <AvgRunTimeFormated>00:06:15</AvgRunTimeFormated>
        <NbrTimesRun>6</NbrTimesRun>
        <LastRunByUserId>24661</LastRunByUserId>
        <LastRunTestSet>2</LastRunTestSet>
        <LastRunTestSetTitle>Regression Tests</LastRunTestSetTitle>
        <LastRunDate>2014-07-20T10:53:07</LastRunDate>
        <LastRunStatus>Passed</LastRunStatus>
        <NbrSteps>10</NbrSteps>
        <NbrEscalations>0</NbrEscalations>
        <DateLastEscalated>0001-01-01T00:00:00</DateLastEscalated>
        <LastEscalationRuleId>0</LastEscalationRuleId>
        <NbrFilesNotSecured>0</NbrFilesNotSecured>
        <NbrFiles>0</NbrFiles>
        <NbrNotes>0</NbrNotes>
        <NbrEvents>0</NbrEvents>
        <ScriptName></ScriptName>
      </Tests_LoadResult>
    </Tests_LoadResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

Tests_Add
Tests_Delete
Tests_LoadByCriteria
Tests_Update
SOAP API Reference
Test Operations
SOAP API Reference

Highlight search results