在我的jmeter
脚本中,我想应用一个逻辑,我在第一个请求的time stamp
和第二个最后一个请求中使用logout
。 time stamps
超过3600 sec
时的差异应触发logout
交易。我可以使用time stamps
取jmeter _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控制器中并给出条件。有人可以帮忙吗?
答案 0 :(得分:1)
查看__longSum() function您可以用来减去2 Unix timestamps
onInitialSearch
必要时${__time(,start)}
必要时您可以将${__time(,end)}
和end
之间的差异视为start
演示: