Some test plans need to use different values for different users/threads. For example, you might want to test a sequence that requires a unique login for each user.This is easy to achieve with the facilities provided by JMeter.按照说明书上是不是应该这么设置呢。。。。
For example:
The CSV Data Set element will read a new line for each thread.
- Create a text file containing the user names and passwords, separated by commas.Put this in the same directory as your test plan.
- Add a CSV DataSet configuration element to the test plan.Name the variables USER and PASS.
- Replace the login name with ${USER} and the password with ${PASS} on the appropriatesamplers
我在脚本的目录下建立了一个a.txt的文件,里面三行数据
test1,test11
test2,test22
test3,test33
然后在脚本里面添加了CSV DATA SET
VariableNames设置为USER,PASS
然后在login页面里面
对变量USERNAME 设置为"${USER}"
对变量PASSWORD设置为"${PASS}"
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |