class WebPageTasks(TaskSet): def on_start(self): self.test_runner = LocustRunner(self.client) self.file_path = self.locust.file_path @task def test_specified_scenario(self): self.test_runner.run(self.file_path)
def test_LocustRunner(self): testcase_file = os.path.join(os.getcwd(), 'tests', 'httpbin', 'basic.yml') locust_runner = LocustRunner(self.locust_client) locust_runner.run(testcase_file)
def on_start(self): self.test_runner = LocustRunner(self.client) self.file_path = self.locust.file_path