How to extract and store a value from jmeter response and store inn csv?

给你一囗甜甜゛ 提交于 2020-04-18 01:45:10

问题


My Jmeter response looks like..

https://adcd.com/abc/bcd/mock.jsp?profile=teslatest&JTnumber=132323235674897&SUTest=27&SUName=Alexa&TARGET=abcd.com">

How to extract JTnumber from this and store in a csv? How about if we have 20 different JTnumbers from 20 responses? How to save all in a csv??

Please help me in achieving this..!!


回答1:


  1. Add the next line to user.properties file (lives in "bin" folder of your JMeter installation)

    sample_variables=JTnumber
    

    see Sample Variables chapter of the JMeter User Manual for more information.

  2. Restart JMeter to pick the property up
  3. Add Regular Expression Extractor as a child of the request which returns the above response and configure it like:

  4. Add Flexible File Writer to your Test Plan and configure it like:

  5. That's it, when you run the test you will see values.csv file in the "bin" folder of your JMeter installation containing all these JTnumber values, each on new line


来源:https://stackoverflow.com/questions/60635179/how-to-extract-and-store-a-value-from-jmeter-response-and-store-inn-csv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!