hyahia
16 years agoNew Contributor
AMF Scripting
Hi,
i am using amf requests and i need to pass somme property to the amf step.
Here is the case :
- A property named "id" is set in a properties step named "Properties"
- An AMF Request is défined with a parameter "study" set to null initially.
- And I want to pass id value to the amf request
I've tried 2 things, unsuccessfully :
1) get the "id" property by using testRunner from within the script of the amf step :
def targetStep = testRunner.testCase.getTestStepByName( "Properties" );
study.userId = targetStep.getPropertyValue("id");
But when i do that i get an exception :
Wed Apr 07 14:14:19 CEST 2010:ERROR:groovy.lang.MissingPropertyException: No such property: testRunner for class: Script17
2) use a property transfer to set the amf request parameter and get the value in the script by invoking parameters['study'].
But, when i execute and look to thye value after the transfer paraméter, study had a null value instead
Is there any thing to try so i get working arround that.
Thanks for your replies.
i am using amf requests and i need to pass somme property to the amf step.
Here is the case :
- A property named "id" is set in a properties step named "Properties"
- An AMF Request is défined with a parameter "study" set to null initially.
- And I want to pass id value to the amf request
I've tried 2 things, unsuccessfully :
1) get the "id" property by using testRunner from within the script of the amf step :
def targetStep = testRunner.testCase.getTestStepByName( "Properties" );
study.userId = targetStep.getPropertyValue("id");
But when i do that i get an exception :
Wed Apr 07 14:14:19 CEST 2010:ERROR:groovy.lang.MissingPropertyException: No such property: testRunner for class: Script17
2) use a property transfer to set the amf request parameter and get the value in the script by invoking parameters['study'].
But, when i execute and look to thye value after the transfer paraméter, study had a null value instead
Is there any thing to try so i get working arround that.
Thanks for your replies.