-
Notifications
You must be signed in to change notification settings - Fork 129
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
Possibility to change LoadSimulationsSettings within a JSON file with values provided from command line arguments. #672
Comments
Hi @OlehBabkov , |
Hi @AntyaDev! dotnet mytests --scenarioName ScenarioName --loadSimulationSettings keepConstant --copies 4 --during 00:00:07 --endpointUri http://someendpoint.com/ just an example, where I can take these args from a console and replace the default values in a config.json file. While I was investigating this approach I found out that with a help of IOptions pattern I can easily handle GlobalCustomSettings and replace values there, but with a structure of LoadSimulationsSettings it is not working (maybe because of a structure of { "KeepConstant": [ 4, "00:00:07" ] } (for example) or maybe I'm doing something wrong and there can be a solution how to change exactly LoadSimulationsSettings out of the box, but I didn't found it in a documentation for NBomber. Ask for your help |
@OlehBabkov I don't know how we can set it via Console arguments (CLI args). maybe Also, what if the user wants to run several scenarios? The thing is that NBomber supports many configurations, and we should think how to expose it via CLI args :) |
Hi @OlehBabkov can you tell please what are the limitations for you to pass different json files?
|
Hi @AntyaDev ! Actually, no limitations. I just thought that it would be nice to run each docker container with it's own configurations from cli based on each test (we have different test scenarios) and what we need to change (except of GlobalCustomSettings part) is only duration of a test and LoadSimulationSettings |
@OlehBabkov If you have a few predefined variations for LoadSimulations, you could use a different JSON config per variation. I got your point, and I like the proposed options via CLI args. The only thing that is not clear for now is how to expose this functionality via CLI to cover NBomber functionality: multiple scenarios, LoadSimulations array, etc. |
We actually have something similar. Instead of passing everything using the command line, we define multiple JSON config files and then use the command line argument to specify which JSON to use. |
Hi @OlehBabkov , |
As part of our system configuration process, we currently manage load simulation settings within a JSON file. However, we often encounter scenarios where we need to dynamically adjust these settings based on specific requirements or test scenarios.
To improve flexibility and efficiency in configuring load simulations, it would be perfect to have the possibility of updating the LoadSimulationsSettings directly from command line arguments.
The text was updated successfully, but these errors were encountered: