Techknow Study

JMETER "HTTP Request" Parameters Value to a CSV File

2:56:00 PM vikas 0 Comments Category :

Print JMETER "HTTP Request" Parameters Value into a CSV File

Now this post is all about some JMETER problem we are facing.
  • Some time we have a requirement like to geneterate a Value like "CID167" where "CID" is fixed and "167" is random number. Also pass that value into a parameter name(Ex. Here customerID and system_customerID ) and write that value to csv file.

    So here i am suggesting some solution may be this is use full for you guys.
  • Now fallow these Steps to complete your requirement.

    • Add Random variable inside that Transaction where you need to generate that variable
    • Open HTTP Request of that Transaction where you have to substitute parameter value with Random Variable "Variable Name".
    • Substitute that parameter value. Ex.
    • Now to write that parameter value into CSV file add a BanShell PostProcessor  inside that HTTP Request. And the code of BeanShell PostProcessor is:-
  • Open the path given in BeanShell PostProcessor (Ex./my/file/path/).
  • Open the generated CSV file (Ex.output.csv) and see desired result.


RELATED POSTS

0 comments