Created On:  02 November 2011


How do I add a parameter to a TestDefinition via the SilkCentral tmplanning Web Service?


To add a paramter to a Test Definition via the SilkCentral Web Services, we must first create a PropertyValue that defines the parameter to be added, for example:

     PropertyValue parameterTest = new PropertyValue();
     parameterTest.setType(1); //Set parameter to String
     parameterTest.setValue("a test from the web services");

In the above code, we have defined a parameter with the name "WebService" of type "text" with a value of "a test from the web services" that will be added to a TestDefinition with the ID 104. To add the said parameter to the said TestDefinition, we must use the updateProperty method available on the tmplanning Web Service:

     plnBind.updateProperty(lSession, parameterTest);

On executing the above we should now find that our parameter has been added to the said TestDefinition, as verified by inspecting the parameters tab:

The parameter type values are defined as follows:
     - String = 1
     - Number = 5
     - Float = 10
     - Boolean = 3
     - Character = 9
     - Password = 9