Forum Discussion

berula01's avatar
berula01
Occasional Visitor
7 years ago

Change the request of a teststep depending on the result of the previous teststep

I want to change the Request of  teststep "RQCreate".

 

 

if (propTestStep.getPropertyValue("propTestumgebung")== "TUD") {

xml="<person><lastName>TST Name<lastName><firstName>TST Vorname<firstName></person>"
} else {

xml='<person><lastName>TSTConn Aliastest 00001<lastName><firstName>TSTConn Vorname<firstName>

<dateOfBirth xsi:nil="true"/>   <placeOfBirth xsi:nil="true"/><countryOfBirth core:keyType="PKLDZ" xsi:nil="true"/><nameOfBirth xsi:nil="true"/></person>'

testRunner.getTestCase().getTestStepByName('${RQCreate}').getProperty('Request').setValue(xml)

 

 This results in an error "Cannot get property 'Request' on null object."

 

Any suggestion how to do it the right way.

Regards
berula01

No RepliesBe the first to reply