JMeter: Read CSV file contents into JUnit testcase program using CSV Data Set Config

前端 未结 3 1636
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-26 19:42

I want to use data from CSV file mentioned in CSV Data Set Config of JMeter into my JUnit testcase program and pass that data to test method.

I know how to get data from

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-26 20:24

    You can try using:

     JMeterContextService.getContext().getVariables().get("varName") 
    

    see:

    • https://jmeter.apache.org/api/org/apache/jmeter/threads/JMeterContext.html#getVariables()

    • https://jmeter.apache.org/api/org/apache/jmeter/threads/JMeterContext.html

提交回复
热议问题