Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you consider json objects to automatically generate pressure test scripts #2675

Closed
2 tasks done
waitingSunset opened this issue Apr 15, 2024 · 2 comments
Closed
2 tasks done
Labels
feature request stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it

Comments

@waitingSunset
Copy link

Prerequisites

Description

just
"""[{"name": "Link-A",
"stresstestRate": 22,
"actionList": [
{"actionName": "api-1",
"actionRanking": 1,
"parameterConfs": [],
"resultExtractConfs": [],
"communicationConf": {"actionUrl": "",
"protocolMethod": "GET",
"headerConf": {},},
"assertConf": {}},
{"actionName": "api-2",
"actionRanking": 1,
"parameterConfs": [],
"resultExtractConfs": [],
"communicationConf": {"actionUrl": "",
"protocolMethod": "POST",
"headerConf": {}, },
"assertConf": {}}]
},
{"name": "Link-B",
"stresstestRate": 78,
"actionList": [{"actionName": "api2",
"actionRanking": 1,
"parameterConfs": [],
"resultExtractConfs": [],
"communicationConf": {"actionUrl": "",
"protocolMethod": "GET",
"headerConf": {},
},
"assertConf": {}}]}]

"""

@cyberw
Copy link
Collaborator

cyberw commented Apr 15, 2024

Sure. I guess it would be reasonably simple to make a HttpUser or TaskSet subclass that constructs tasks based on a json.

Or you can just have a for-loop in a task that iterates over the json. If you want to contribute something then I think this would fit nicely in the locust-plugins project.

@cyberw cyberw added the stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it label May 10, 2024
Copy link

This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it
Projects
None yet
Development

No branches or pull requests

2 participants