只开头和结尾执行一次请求

def on_start(self):

""" on_start is called when a Locust start before any task is scheduled """

  self.login()

def on_stop(self):

 """ on_stop is called when the TaskSet is stopping """

   self.logout()

 

猜你喜欢

转载自www.cnblogs.com/kaibindirver/p/11774651.html