diff --git a/locust/main.py b/locust/main.py index 006ed58af4..d8a4643dcb 100644 --- a/locust/main.py +++ b/locust/main.py @@ -86,17 +86,20 @@ def main(): user_classes: Dict[str, locust.User] = {} available_user_classes = {} available_shape_classes = {} + shape_class = None for _locustfile in locustfiles: - docstring, _user_classes, shape_class = load_locustfile(_locustfile) + docstring, _user_classes, shape_classes = load_locustfile(_locustfile) # Setting Available Shape Classes - if shape_class: - shape_class_name = type(shape_class).__name__ - if shape_class_name in available_shape_classes.keys(): - sys.stderr.write(f"Duplicate shape classes: {shape_class_name}\n") - sys.exit(1) + if shape_classes: + shape_class = shape_classes[0] + for shape_class in shape_classes: + shape_class_name = type(shape_class).__name__ + if shape_class_name in available_shape_classes.keys(): + sys.stderr.write(f"Duplicate shape classes: {shape_class_name}\n") + sys.exit(1) - available_shape_classes[shape_class_name] = shape_class + available_shape_classes[shape_class_name] = shape_class # Setting Available User Classes for key, value in _user_classes.items(): diff --git a/locust/static/css/application.css b/locust/static/css/application.css index 672a76b2ae..187eba4e51 100644 --- a/locust/static/css/application.css +++ b/locust/static/css/application.css @@ -470,5 +470,22 @@ body.ready .main { margin-right: 10px; color: #48a584; } +.userClass { + border: none; + background: #fff; + height: 100px; + width: 340px; + font-size: 18px; + padding-left: 10px; +} + +.shapeClass { + border: none; + background: #fff; + /* height: 100px; */ + width: 340px; + font-size: 18px; + padding-left: 10px; +} /*# sourceMappingURL=application.css.map */ diff --git a/locust/templates/index.html b/locust/templates/index.html index 2abb59897d..0005887c1e 100644 --- a/locust/templates/index.html +++ b/locust/templates/index.html @@ -65,7 +65,7 @@

Start new load test

{% for user in available_user_classes %} {% endfor %} -
range +