【发布时间】:2020-01-10 14:30:12
【问题描述】:
我想通过 csv 文件多次模拟具有 2 个 http 请求和 1 个 http 请求的用户。下面是我的结构
Test Plan
- Thread Group *[No. of threads = 2, Ramp-up = 1, Loop count = 1]*
- - View Results Tree
- - Simple Controller
- - - http request 1
- - - http request 2
- - - while controller *[condition = ${no} (variable from csv file)]*
- - - - http request 3
- - - - CSV Data set Config *[Recycle on EOF = False, Stop on EOF = False, Sharing Mode = All threads] and CSV file has 3 records*
预期:1 个用户应该执行
http请求1,http请求2,http请求3,http请求3,http请求3(因为csv有3条记录)
- 如果我保持 在 EOF = False 时循环,在 EOF = False 时停止,它会继续运行请求,直到脚本结束并且在数据结束(即 3 行)之后它开始抛出错误
- 如果我保持在 EOF = True 时循环,在 EOF = True 时停止,它只会为 1 个用户运行并停止。
- 如果我保持 在 EOF = True 时循环,在 EOF = False 时停止,它将继续运行请求,直到脚本结束
- 如果我保持在 EOF = False 时循环,在 EOF = True 时停止,它只会为 1 个用户运行并停止。
但无法按照我的预期进行模拟。任何帮助,将不胜感激。谢谢。
【问题讨论】:
标签: java csv jmeter performance-testing