This would be a really nice feature.
no explanation and nothing to do here... closing.
Swagger is a framework for APIs. It has ability to export APIs endpoints with arguments that particular endpoint can accept. Locust could import this json/yaml file and automatically generate all endpoints to test. The user could further apply weight and other properties
Whole specification can be found here.
Example:
/pets:
get:
description: Returns all pets from the system that the user has access to
produces:
- application/json
responses:
'200':
description: A list of pets.
schema:
type: array
items:
$ref: '#/definitions/pet
@dolohow there is a project that uses swagger files to generarate locust tasks. It can handle only GET-endpoints, but you're welcome to contribute - https://github.com/lieldulev/swagger-to-locustfile