Replaces the test configuration information with that from the specified TestConfiguration
object. Uninitialized properties are cleared.
First, you usually call TestConfigurations_Load
to get a test configuration by ID, change some of its properties, and then pass the updated object to TestConfigurations_Update.
Requirements
The authenticating user must belong to a user group that has the Update privilege for Test Lbirary.
Parameters
The operation uses the following parameters:
AuthenticationData : AuthenticationData, required
An AuthenticationData
object containing the login information and the project ID that contains the test configuration.
TestConfiguration : TestConfiguration, required
A TestConfiguration
object that represents the configuration with updated properties.
SendEmailAlert : string, required
Y
means send an email alert to the subscribed users after updating the test configuration.
Any other value (for example, N
or empty string) means do not send email alerts.
Result
None.
Remarks
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 = "[email protected]";
string password = "p@ssword";
int projID = 10372;
// Specifying the test configuration to update
int ID = 254;
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 configuration
TestConfiguration testConfig = service.TestConfigurations_Load(authData, ID);
// Updating the status of the configuration
testConfig.IsActive = "N";
// Updating the test configuration
service.TestConfigurations_Update(authData, testConfig, "N");
Console.WriteLine("The test configuration was updated");
Java
String login = "[email protected]";
String password = "p@ssword";
int projID = 10372;
// Specifying the test configuration to update
int ID = 254;
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 configuration
TestConfiguration testConfig = service.testConfigurationsLoad(authData, ID);
// Updating the status of the configuration
testConfig.setIsActive("N");
// Updating the test configuration
service.testConfigurationsUpdate(authData, testConfig, "N");
System.out.format("Test configuration was updated");
Sample Request XML
POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 996 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/TestConfigurations_Update"
<?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_Update xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>7154</DeptId>
<ProjId>1032</ProjId>
<UserId>25315</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<TestConfiguration>
<ConfigId>254</ConfigId>
<ProjId>10372</ProjId>
<ConfigurationName>Windows 7 (32-bit)</ConfigurationName>
<Description>Standard Windows 7 (32-bit) system environment.</Description>
<IsActive>N</IsActive>
<CreateUserId>27572</CreateUserId>
<DateCreated>2014-07-24T09:12:08.037</DateCreated>
<OwnerUserId>27572</OwnerUserId>
<OriginalId>0</OriginalId>
<ImportId>0</ImportId>
<OwnerName>Davis, Eugeny</OwnerName>
<UserName>Doe, John</UserName>
</TestConfiguration>
<SendEmailAlert>N</SendEmailAlert>
</TestConfigurations_Update>
</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: 1004 {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_Update xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>7154</DeptId>
<ProjId>1032</ProjId>
<UserId>25315</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<TestConfiguration>
<ConfigId>254</ConfigId>
<ProjId>10372</ProjId>
<ConfigurationName>Windows 7 (32-bit)</ConfigurationName>
<Description>Standard Windows 7 (32-bit) system environment.</Description>
<IsActive>N</IsActive>
<CreateUserId>27572</CreateUserId>
<DateCreated>2014-07-24T09:12:08.037</DateCreated>
<OwnerUserId>27572</OwnerUserId>
<OriginalId>0</OriginalId>
<ImportId>0</ImportId>
<OwnerName>Davis, Eugeny</OwnerName>
<UserName>Doe, John</UserName>
</TestConfiguration>
<SendEmailAlert>N</SendEmailAlert>
</TestConfigurations_Update>
</soap12:Body>
</soap12:Envelope>
Sample Response XML
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 319 {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_UpdateResponse xmlns="http://www.pragmaticsw.com/" />
</soap:Body>
</soap:Envelope>
SOAP 1.2
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 329 {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_UpdateResponse xmlns="http://www.pragmaticsw.com/" />
</soap12:Body>
</soap12:Envelope>
See Also
TestConfigurations_Add
TestConfigurations_Delete
TestConfigurations_Load
TestConfigurations_LoadByCriteria
Test Management Operations
Test Configuration Operations
SOAP API Reference