TestConfigurations_Add Operation

Applies to QAComplete 12.71 SaaS, last modified on January 19, 2021

Creates a new test configuration in QAComplete.

Use the ProjId value in the AuthenticationData parameter to specify the project to create the test configuration in it.

Requirements

The authenticating user must belong to a user group that has the Add privilege for Test Library.

Parameters

The operation uses the following parameters:

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object containing the login information and the project ID to create the test configuration in.

TestConfiguration  :  TestConfiguration, required

A TestConfiguration object that represent the test configuration you want to add to the project.

SendEmailAlert  :  string, required

Y means send an email alert to the subscribed users after adding the test configuration.

Any other value (for example, N or empty string) means do not send email alerts.

NewNotes  :  string

A note to add to the test case.

Result

An integer ID of the created test configuration.

Remarks

The TestConfiguration object you pass in must have all property values required by your QAComplete instance. You can see the required properties in two places:

  • Required fields for test configurations:  > Setup > System Configuration > Screen Layouts > Test Configurations > Required Fields.

  • Test configuratuions workflow transitions: Test Management > Test Configurations > Actions > Manage Workflows > select status  > Select fields for this Transition.

Do not specify the following properties, they are set automatically:

  • DateCreated and DateUpdated are set to the current date and time.

  • UpdateUserId and UserName are set to the authenticating user.

  • NbrFiles, NbrNotes, NbrFilesNotSecured show how many items are actually linked to the test configuration.

The TestConfiguration object has matching Id and Name properties, for example, FolderId and FolderName. To set them, specify the value only for the Id property. The corresponding Name property will be set automatically.

Example

Sample Code

C#

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

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;

// Preparing the TestConfiguration object
TestConfiguration testConfig = new TestConfiguration();
testConfig.ConfigurationName = "Windows 7 (x32)";
testConfig.IsActive = "Y";

// Adding the test configuration
int tcID = service.TestConfigurations_Add(authData, testConfig, "N", "");
Console.WriteLine("The ID of the new test configuration: {0}", tcID);

Java

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

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);

// Preparing the TestConfiguration object
TestConfiguration testConfig = new TestConfiguration();
testConfig.setConfigurationName("Windows 7 (x32)");
testConfig.setIsActive("Y");

// Adding the test configuration
int ID = service.testConfigurationsAdd(authData, testConfig, "N", "");
System.out.format("ID of the created test configuration: %d%n", ID);

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 735 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/TestConfigurations_Add"
 

<?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>
    <TestConfigurations_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TestConfiguration>
        <ConfigurationName>Windows 7 (32-bit)</ConfigurationName>
        <Description>Standard Windows 7 (32-bit) system environment.</Description>
        <IsActive>Y</IsActive>
      </TestConfiguration>
      <SendEmailAlert>N</SendEmailAlert>
      <NewNotes></NewNotes>
    </TestConfigurations_Add>
  </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: 743 {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>
    <TestConfigurations_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TestConfiguration>
        <ConfigurationName>Windows 7 (32-bit)</ConfigurationName>
        <Description>Standard Windows 7 (32-bit) system environment.</Description>
        <IsActive>Y</IsActive>
      </TestConfiguration>
      <SendEmailAlert>N</SendEmailAlert>
      <NewNotes></NewNotes>
    </TestConfigurations_Add>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 411 {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>
    <TestConfigurations_AddResponse xmlns="http://www.pragmaticsw.com/">
      <TestConfigurations_AddResult>254</TestConfigurations_AddResult>
    </TestConfigurations_AddResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 421 {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>
    <TestConfigurations_AddResponse xmlns="http://www.pragmaticsw.com/">
      <TestConfigurations_AddResult>254</TestConfigurations_AddResult>
    </TestConfigurations_AddResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

TestConfigurations_Delete
TestConfigurations_Load
TestConfigurations_LoadByCriteria
TestConfigurations_Update
Test Management Operations
Test Configuration Operations
SOAP API Reference

Highlight search results