class WebPageTasks(TaskSet): def on_start(self): config = {} self.test_runner = Runner(config, self.client) @task def test_any(self): test_dict = random.choice(self.locust.tests) try: self.test_runner.run_test(test_dict) except (AssertionError, MyBaseError, MyBaseFailure) as ex: request_failure.fire( request_type=self.test_runner.exception_request_type, name=self.test_runner.exception_name, response_time=0, exception=ex)
def on_start(self): self.test_runner = Runner(self.client) self.testcases = loader.load_locust_tests(self.locust.file_path)
def on_start(self): config = {} self.test_runner = Runner(config, self.client)
def on_start(self): self.test_runner = Runner(self.locust.config, self.locust.functions, self.client)