locusts support weight feature

This commit is contained in:
debugtalk
2018-10-29 20:49:24 +08:00
parent aed7013b1d
commit 2d5ff04b46
10 changed files with 133 additions and 50 deletions

View File

@@ -255,22 +255,3 @@ class HttpRunner(object):
html_report_name,
html_report_template
)
class LocustRunner(object):
def __init__(self, locust_client):
self.runner = HttpRunner(http_client_session=locust_client)
def run(self, path):
try:
self.runner.run(path)
except exceptions.MyBaseError as ex:
# TODO: refactor
from locust.events import request_failure
request_failure.fire(
request_type=test.testcase_dict.get("request", {}).get("method"),
name=test.testcase_dict.get("request", {}).get("url"),
response_time=0,
exception=ex
)