Skip to content

Fix web UI user count not persisting in parsed_options - #3517

Merged
cyberw merged 1 commit into
locustio:masterfrom
saiyaswanth883:sai-yaswanth
Sep 20, 2026
Merged

cyberw merged 1 commit into
locustio:masterfrom
saiyaswanth883:sai-yaswanth

Conversation

@saiyaswanth883

Copy link
Copy Markdown
Contributor

Summary

  • Store the swarm form user count in parsed_options.num_users so a page refresh shows the last submitted value instead of falling back to 1.
  • Assert this in the existing web UI swarm test.

Test plan

  • Start Locust with the web UI, set Number of users to something other than 1, start the test, refresh the page, confirm the form still shows that value.
  • pytest locust/test/test_web.py::TestWebUI::test_swarm_host_value_specified

@saiyaswanth883

Copy link
Copy Markdown
Contributor Author

Related bug report: #3518

The user_count form field in the web UI was being stored as "users"
instead of "num_users", so parsed_options.num_users was not updated.
Add an assertion to the existing test to cover this.
@cyberw
cyberw merged commit 0cf53b5 into locustio:master Sep 20, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants