Reputation: 107
We have user defined variable name as "search".
I am using below line to write in csv file in beanshell postprocessor but its showing me "void" in csv file:
print(${search});
please help.
Upvotes: 1
Views: 854
Reputation: 168157
print()
function basically writes the value to STDOUT, if you want to write the value to a file you should do it differently. Assuming all above you should be using something like:
new File("/path/to/your/file.csv") << vars.get("search")
More information: Apache Groovy - Why and How You Should Use It
Upvotes: 2