在时间戳上有所不同,以便在JMeter中启动注销

时间:2018-05-15 07:01:32

标签: jmeter

在我的jmeter脚本中,我想应用一个逻辑,我在第一个请求的time stamp和第二个最后一个请求中使用logouttime stamps超过3600 sec时的差异应触发logout交易。我可以使用time stampsjmeter _time function但无法成功减去logout。如果我可以完成这项工作,那么我可以将 I used this solution in my view.py file : def view_name(request): if request.method == "POST": screenname = request.POST.get("handle", None) # handle is the name of the input in the question. # Here you can do anything with your screenname, like passing it to the function. return render(request, 'path/to/form.html', {}) but getting the unicode error as "'unicode' object has no attribute 'script1_'" FYI below is my code: <form id="modifySingleTag" name="ModifiedSingletag" method="post" >{% csrf_token %} <div class="input-wrapper"> <div class="title first"> <span class="option">copy and paste the tag to modify here:</span> <textarea class="input_textarea" name="input_textarea1"></textarea> </div> </div> <div class="buttons"> <button id="modifyButton" name="Modifytag" class="btn primary" type="submit" title="" value="Modify"> MODIFY</button> </div> </form> View.py: if request.method == 'POST' and request.POST['Modifytag'] == 'Modify': script1_ = request.POST.get("input_textarea1", None) print "I am script1 from Views.py".script1_ modify_tag(script_=script1_, dimension='320X568', os_='ANDROID') print "the script from single tag view". script1_ return render(request, 'home/index.html') 放在if控制器中并给出条件。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:1)

查看__longSum() function您可以用来减去2 Unix timestamps

  1. 将开头定义为:onInitialSearch必要时
  2. 将结束定义为:${__time(,start)}必要时
  3. 您可以将${__time(,end)}end之间的差异视为start

    演示:

    JMeter delta between timestamps

  4. 更多信息:How to Use JMeter Functions