摘要: import re ''' 取值postid,左边界"postid=",右边界"&" ''' url="http://wwww.baidu.com/aspx?postid=6232&actiontip='保存成功'" postid=re.findall(r"postid=(.*?)&",url)[0] print(postid) def findall_data(data,LB="",RB="... 阅读全文
posted @ 2019-07-15 23:19 心痛是尾调 阅读(1198) 评论(0) 推荐(0) 编辑
摘要: from locust import HttpLocust,TaskSet,task ''' 点击STOP,会停止测试,并调用所有当前执行的TaskSet的on_stop,但不会调用teardown函数 ctrl +c,表示停止locust运行,此时会调用TaskSet teardown # 停止locust运行时执行,Locust teardown # 停止locust运行时执行,(而不会... 阅读全文
posted @ 2019-07-15 12:45 心痛是尾调 阅读(1873) 评论(0) 推荐(0) 编辑