Jmeter时间和日期动态变化 [英] Jmeter time and date dynamic change
本文介绍了Jmeter时间和日期动态变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个测试计划,其中在参数中传递了日期和时间...我需要动态更改参数,以便在运行测试计划时生成新的日期和时间....参数如下:
I have created a Test plan in which there is date and time being passed in the parameters...I need to change the parameters dynamically so that when I run the test plan a new date and time is generated....the parameters look like this:
名称.值
请求:2018-04-08 22:13:51
request : 2018-04-08 22:13:51
我该怎么办?
推荐答案
您可以使用 __time 函数
时间函数以各种格式返回当前时间.
The time function returns the current time in various formats.
输入格式作为第一个参数yyyy-MM-dd hh:mm:ss
Enter your format as the first paramater yyyy-MM-dd hh:mm:ss
输入变量名作为第二个参数:
Enter your variable name as second parameter:
${__time(yyyy-MM-dd hh:mm:ss, Value)}
这篇关于Jmeter时间和日期动态变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文