Forum Discussion
AnandKiran
15 years agoFrequent Contributor
Hi,
Why dont you use a property transfer step to achieve your requriement
follow the below steps
1 - For example considering the Operation Name as " Add "
2. Clone the operation step and name it as " Intiallizer" ( This must be your default Request)
3. Now in your test case you will be having two Operation Steps (i.e two Request XMLs)
4. Use a property transfer step to transfer the " Intiallizer" XML to "Add".
If you want to do in groovy here is the code
// get request property
request1 = groovyUtils.getXmlHolder("Intiallizer#Request")
def Intiallizer_XML = request1.xml
// set request property
request2 = testRunner.testCase.getTestStepByName( "Add " )
request2.getProperty("request").setValue(Intiallizer_XML)
Let me know whether it helps.
Regards
Anand.
Why dont you use a property transfer step to achieve your requriement
follow the below steps
1 - For example considering the Operation Name as " Add "
2. Clone the operation step and name it as " Intiallizer" ( This must be your default Request)
3. Now in your test case you will be having two Operation Steps (i.e two Request XMLs)
4. Use a property transfer step to transfer the " Intiallizer" XML to "Add".
If you want to do in groovy here is the code
// get request property
request1 = groovyUtils.getXmlHolder("Intiallizer#Request")
def Intiallizer_XML = request1.xml
// set request property
request2 = testRunner.testCase.getTestStepByName( "Add " )
request2.getProperty("request").setValue(Intiallizer_XML)
Let me know whether it helps.
Regards
Anand.