Werner_Blueml
15 years agoOccasional Contributor
Dynamically adding properties for HTTP Request
Hi,
we have HTTP-Requests with different numbers of properties depending on testdata.
Is it possible to add properties dynamicly to a HTTP-Request ?
e.g. A usergroup can have 1 or more members. If there is only one member we need only the properties with ('0') with two members properties with ('0') and ('1') and so on.
productLineModels('0').accessIdentyModel.firstName=Max&
productLineModels('0').accessIdentyModel.lastName=Meier&
productLineModels('0').accessIdentyModel.birthDate=24.01.51&
productLineModels('1').accessIdentyModel.firstName=FNP2Meier&
productLineModels('1').accessIdentyModel.lastName=LNP2Meier&
productLineModels('1').accessIdentyModel.birthDate=18.04.88&
productLineModels('2').accessIdentyModel.firstName=FNP3Meier&
productLineModels('2').accessIdentyModel.lastName=LNP3Meier&
productLineModels('2').accessIdentyModel.birthDate=16.05.55
Is there a way?
We try it in this way... but it didn't work:
groovyUtils.setPropertyValue("registerSelectProduct.action", "myProperty", "Hello World!")
We looking for a method like this....
request.addProperty(new Property("name", "value"))
Regards
Werner
we have HTTP-Requests with different numbers of properties depending on testdata.
Is it possible to add properties dynamicly to a HTTP-Request ?
e.g. A usergroup can have 1 or more members. If there is only one member we need only the properties with ('0') with two members properties with ('0') and ('1') and so on.
productLineModels('0').accessIdentyModel.firstName=Max&
productLineModels('0').accessIdentyModel.lastName=Meier&
productLineModels('0').accessIdentyModel.birthDate=24.01.51&
productLineModels('1').accessIdentyModel.firstName=FNP2Meier&
productLineModels('1').accessIdentyModel.lastName=LNP2Meier&
productLineModels('1').accessIdentyModel.birthDate=18.04.88&
productLineModels('2').accessIdentyModel.firstName=FNP3Meier&
productLineModels('2').accessIdentyModel.lastName=LNP3Meier&
productLineModels('2').accessIdentyModel.birthDate=16.05.55
Is there a way?
We try it in this way... but it didn't work:
groovyUtils.setPropertyValue("registerSelectProduct.action", "myProperty", "Hello World!")
We looking for a method like this....
request.addProperty(new Property("name", "value"))
Regards
Werner