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

Use the TestCases_LoadByUNC operation to load all test cases that use the same automation script.

To specify the project to get test cases from, use the ProjId value in the AuthenticationData object in the request body.

To get just one test case, use TestCases_Load. Also, you can load all test cases or test cases filtered by specific condition using TestCases_LoadByCriteria.

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 that contains the test cases.

AutomationScriptUNC  :  string (max 255 chars), required

The UNC address of the automation script.

Result

An array of TestCase objects that represent test cases that use the specified automation script.

Example

Sample Code

C#

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

// Specify the UNC of automated script
string UNC = "\\\\HOST\\FamilyAlbum\\Tests\\test";

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 test cases with the desired automated script
TestCase[] testCases = service.TestCases_LoadByUNC(authData, UNC);
foreach (TestCase testCase in testCases)
{
  Console.WriteLine("{0}: {1}", testCase.Title, testCase.StatusCode);
}

Java

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

// Specify the UNC of automated script
String UNC = "\\\\HOST\\FamilyAlbum\\Tests\\test";

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 test cases with the desired automated script
List<TestCase> testCases = service.testCasesLoadByUNC(authData, UNC).getTestCase();
for (TestCase testCase : testCases)
{
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: 554 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/TestCases_LoadByUNC"
 

<?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_LoadByUNC xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationScriptUNC>\\HOST\FamilyAlbum\Tests\test</AutomationScriptUNC>
    </TestCases_LoadByUNC>
  </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: 562 {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_LoadByUNC xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <AutomationScriptUNC>\\HOST\FamilyAlbum\Tests\test</AutomationScriptUNC>
    </TestCases_LoadByUNC>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 2828 {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_LoadByUNCResponse xmlns="http://www.pragmaticsw.com/">
      <TestCases_LoadByUNCResult>
        <TestCase>
          <TestCaseId>156</TestCaseId>
          <Title>Test internal text editor</Title>
          <StatusCode>Failed</StatusCode>
          <Steps> <![CDATA[<ol><li>Click Tools > Notepad.</li><li>Enter "Test text".</li><li>Close the Notepad dialog.</li></ol>]]> </Steps>
          <ExpectedResults> to save the text must be shown.A n</ExpectedResults>
          <OwnerUserId>27572</OwnerUserId>
          <AssigneeUserId>27942</AssigneeUserId>
          <EstHrs>0.083</EstHrs>
          <EstStart>2014-06-10T10:00:00</EstStart>
          <EstFinish>2014-06-10T10:05:00</EstFinish>
          <PctComplete>100</PctComplete>
          <ActHrs>0.000</ActHrs>
          <ActualStart>2014-06-10T12:15:45</ActualStart>
          <ActFinish>2014-06-10T12:17:12</ActFinish>
          <EstHrsRemaining>0.000</EstHrsRemaining>
          <ActualResults>The offering is not displayed.The new</ActualResults>
          <AssignedToName>Doe, John</AssignedToName>
          <DateCreated>2014-05-30T14:01:51.057</DateCreated>
          <DateUpdated>2014-06-10T12:15:16</DateUpdated>
          <FolderName>FamilyAlbum/Release 1.1/Iteration 1/Build 3432</FolderName>
          <ImportId>0</ImportId>
          <NbrFiles>0</NbrFiles>
          <NbrNotes>0</NbrNotes>
          <NbrTasks>0</NbrTasks>
          <OwnerName>Davis, Eugeny</OwnerName>
          <ProjId>17823</ProjId>
          <UpdateUserId>27942</UpdateUserId>
          <UserName>Doe, John</UserName>
        </TestCase>
        <TestCase>
          <TestCaseId>254</TestCaseId>
          <Title>Attaching text files to the items</Title>
          <StatusCode>Passed</StatusCode>
          <Steps> <![CDATA[<ol><li>Click Tools > Notepad.</li><li>Enter "Test text".</li><li>Click File > Save.</li><li>Enter the name of the file and click OK.</li><li>Close the Notepad dialog.</li></ol>]]> </Steps>
          <ExpectedResults>ew file appears in the attachment section.An o</ExpectedResults>
          <OwnerUserId>27572</OwnerUserId>
          <AssigneeUserId>27942</AssigneeUserId>
          <EstHrs>0.083</EstHrs>
          <EstStart>2014-06-10T10:15:00</EstStart>
          <EstFinish>2014-06-10T10:20:00</EstFinish>
          <PctComplete>100</PctComplete>
          <ActHrs>0.000</ActHrs>
          <ActualStart>2014-06-10T12:32:48</ActualStart>
          <ActFinish>2014-06-10T12:36:54</ActFinish>
          <EstHrsRemaining></EstHrsRemaining>
          <ActualResults> file attached to the item.</ActualResults>
          <AssignedToName>Doe, John</AssignedToName>
          <DateCreated>2014-06-12T17:07:34.043</DateCreated>
          <DateUpdated>2014-06-10T12:38:18</DateUpdated>
          <FolderName>FamilyAlbum/Release 1.1/Iteration 1/Build 3432</FolderName>
          <ImportId>0</ImportId>
          <NbrFiles>0</NbrFiles>
          <NbrNotes>0</NbrNotes>
          <NbrTasks>0</NbrTasks>
          <OwnerName>Davis, Eugeny</OwnerName>
          <ProjId>17823</ProjId>
          <UpdateUserId>27942</UpdateUserId>
          <UserName>Doe, John</UserName>
        </TestCase>
      </TestCases_LoadByUNCResult>
    </TestCases_LoadByUNCResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 2838 {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_LoadByUNCResponse xmlns="http://www.pragmaticsw.com/">
      <TestCases_LoadByUNCResult>
        <TestCase>
          <TestCaseId>156</TestCaseId>
          <Title>Test internal text editor</Title>
          <StatusCode>Failed</StatusCode>
          <Steps> <![CDATA[<ol><li>Click Tools > Notepad.</li><li>Enter "Test text".</li><li>Close the Notepad dialog.</li></ol>]]> </Steps>
          <ExpectedResults> to save the text must be shown.A n</ExpectedResults>
          <OwnerUserId>27572</OwnerUserId>
          <AssigneeUserId>27942</AssigneeUserId>
          <EstHrs>0.083</EstHrs>
          <EstStart>2014-06-10T10:00:00</EstStart>
          <EstFinish>2014-06-10T10:05:00</EstFinish>
          <PctComplete>100</PctComplete>
          <ActHrs>0.000</ActHrs>
          <ActualStart>2014-06-10T12:15:45</ActualStart>
          <ActFinish>2014-06-10T12:17:12</ActFinish>
          <EstHrsRemaining>0.000</EstHrsRemaining>
          <ActualResults>The offering is not displayed.The new</ActualResults>
          <AssignedToName>Doe, John</AssignedToName>
          <DateCreated>2014-05-30T14:01:51.057</DateCreated>
          <DateUpdated>2014-06-10T12:15:16</DateUpdated>
          <FolderName>FamilyAlbum/Release 1.1/Iteration 1/Build 3432</FolderName>
          <ImportId>0</ImportId>
          <NbrFiles>0</NbrFiles>
          <NbrNotes>0</NbrNotes>
          <NbrTasks>0</NbrTasks>
          <OwnerName>Davis, Eugeny</OwnerName>
          <ProjId>17823</ProjId>
          <UpdateUserId>27942</UpdateUserId>
          <UserName>Doe, John</UserName>
        </TestCase>
        <TestCase>
          <TestCaseId>254</TestCaseId>
          <Title>Attaching text files to the items</Title>
          <StatusCode>Passed</StatusCode>
          <Steps> <![CDATA[<ol><li>Click Tools > Notepad.</li><li>Enter "Test text".</li><li>Click File > Save.</li><li>Enter the name of the file and click OK.</li><li>Close the Notepad dialog.</li></ol>]]> </Steps>
          <ExpectedResults>ew file appears in the attachment section.An o</ExpectedResults>
          <OwnerUserId>27572</OwnerUserId>
          <AssigneeUserId>27942</AssigneeUserId>
          <EstHrs>0.083</EstHrs>
          <EstStart>2014-06-10T10:15:00</EstStart>
          <EstFinish>2014-06-10T10:20:00</EstFinish>
          <PctComplete>100</PctComplete>
          <ActHrs>0.000</ActHrs>
          <ActualStart>2014-06-10T12:32:48</ActualStart>
          <ActFinish>2014-06-10T12:36:54</ActFinish>
          <EstHrsRemaining></EstHrsRemaining>
          <ActualResults> file attached to the item.</ActualResults>
          <AssignedToName>Doe, John</AssignedToName>
          <DateCreated>2014-06-12T17:07:34.043</DateCreated>
          <DateUpdated>2014-06-10T12:38:18</DateUpdated>
          <FolderName>FamilyAlbum/Release 1.1/Iteration 1/Build 3432</FolderName>
          <ImportId>0</ImportId>
          <NbrFiles>0</NbrFiles>
          <NbrNotes>0</NbrNotes>
          <NbrTasks>0</NbrTasks>
          <OwnerName>Davis, Eugeny</OwnerName>
          <ProjId>17823</ProjId>
          <UpdateUserId>27942</UpdateUserId>
          <UserName>Doe, John</UserName>
        </TestCase>
      </TestCases_LoadByUNCResult>
    </TestCases_LoadByUNCResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

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

Highlight search results