Forum Discussion
SmartBear_Suppo
Alumni
13 years agoHi,
A Groovy script step seems more natural. This line of code will read the entire contents of a file and save it to the context variable:
context.setProperty("fileContents", new File("/tmp/test.txt").text)
... and then you can insert the file contents into the request XML with this expression
${= context.fileContents }
Hope this helps!
Manne
A Groovy script step seems more natural. This line of code will read the entire contents of a file and save it to the context variable:
context.setProperty("fileContents", new File("/tmp/test.txt").text)
... and then you can insert the file contents into the request XML with this expression
${= context.fileContents }
Hope this helps!
Manne