juanteit
17 years agoNew Contributor
Saving raw xml
I have a request with variables:
...
In the raw tab of the test step, I have:
...
I want to put into a file the raw version with groovy. How can I do that? I tried:
def response = context.testCase.testSteps["bookReservation - Requete base 2"].properties
log.info (response["Request"].value)
It gives the xml tab version.
I also tried:
holderReq = groovyUtils.getXmlHolder (requestname + "#Request")
fileReq = new File( context.getProperty("test_folder") + "\\" + requestname + "-Req.xml" )
writer = fileReq.newWriter()
writer.writeLine(holderReq.xml)
writer.close()
It gives the xml tab version.
...
In the raw tab of the test step, I have:
...
I want to put into a file the raw version with groovy. How can I do that? I tried:
def response = context.testCase.testSteps["bookReservation - Requete base 2"].properties
log.info (response["Request"].value)
It gives the xml tab version.
I also tried:
holderReq = groovyUtils.getXmlHolder (requestname + "#Request")
fileReq = new File( context.getProperty("test_folder") + "\\" + requestname + "-Req.xml" )
writer = fileReq.newWriter()
writer.writeLine(holderReq.xml)
writer.close()
It gives the xml tab version.