Problem:
Resolution:
PropertyValue parameterTest = new PropertyValue();
plnBind.updateProperty(lSession, parameterTest);
parameterTest.setPropertyTypeID("_parameter_");
parameterTest.setPropertyID("_parameter_WebService");
parameterTest.setName("WebService");
parameterTest.setType(1); //Set parameter to String
parameterTest.setValue("a test from the web services");
parameterTest.setNodeID("104");
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:
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