jmeter - How to save specific data from response data to csv file -


in webservices test plan, sending soap request create user , sends username , unique id in response data. want save username , uniqueid csv file.

could let me know how can achieve that?

you can extract data using regex post processor , save variable.

simple data writer, flexible data writer, save results file these can write predefined variables, responses file in fixed or little bit customizable format won't let write custom variables.

for writing file need use beanshell processor. sample code be,

username = vars.get("username"); password = vars.get("password");  f = new fileoutputstream("/path/user_details.csv", true); p = new printstream(f);  this.interpreter.setout(p);  print(username + "," + password); f.close(); 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -