-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Show custom arguments in web ui and forward them to worker #1841
Conversation
I do think this is a cleaner approach to adding custom start UI. I do think that the whole point to add these arguments would be to access them somehow in your tasks to change how they act (so on the worker runner for distributed tests). For instance if you wanted to specify the username and password of the requests it would be best if you could access these in the worker to set them in the header of the requests. Another downside to this approach is all of your custom fields will be text boxes so its hard to predict what users will put there. In the end I think its a good approach to solve my issue. In my local branch I solved the problem with not being able to access the variables in the worker branch by sending a message from the master runner to the worker runner as suggested here. @cyberw |
Would the parsed_options be populated with the correct data on the worker instance of env? |
This approach makes them accessible in tasks by
Not automatically no, that would also have to be addressed (hence the draft status :) |
This all looks amazing to me :). I think it will become one of the more uses locust feature when implements. Thanks! |
@TWoeste Can you try this out before I merge it? |
…ments to workers, but only the custom arguments (not built-in ones) are actually processed by the worker. In the future we could (should?) make it so that all parameters will be accepted.
93d5a13
to
e3d969d
Compare
… workers. Update the add_command_line_argument.py to actually USE the custom argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Tested it with the example file!
…y might be set in locust web ui nowadays, since locustio/locust#1841)
This is WIP. I'm not sure showing all custom arguments in the UI is the best solution (and it would also be nice to be able to show some of the default ones). What do you think @TWoeste
I tried to make that "advanced" tab thingy but it turned out to be too much work :)