Repository navigation
test: add dataset sizes, expensive query and authentication load tests - #167
Merged
Merged
Conversation
The factory now seeds through an overridable SeedAsync and exposes the tournament ids, round robin tournament ids and user emails that scenarios pick from. LoadTestDataSeeder generates users and a cycle of open, closed, completed and round robin tournaments, so standings have real matches to compute. Load test clients stop handling cookies, so virtual users no longer share one refresh token cookie. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
GraphQLLoadStep can send a refresh token cookie, hand the response headers and body to a callback, and classify a GraphQL error as an expected rejection by predicate. VirtualUserSessions logs users in once during scenario init and picks a session per invocation. LoadTestRun.ExecuteAll runs several scenarios in one NBomber run and reports every failed threshold together. Step budgets come from measured baselines per dataset size, with headroom ratios and floors applied in code, and a step without a baseline fails loudly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Run list, view and discover scenarios concurrently at a fixed arrival rate against the default, Medium and Large datasets. Each step is checked for health, tail latency and payload size against its measured budget. The rate is about 25 requests per second because this mix saturates the in-process host between 25 and 50. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cover owner and participant tournament history, round robin standings, the authenticated own history and the oversized page rejection. The history queries are the slowest steps today, and their measured cost is recorded in the budgets instead of being fixed here. The oversized page request counts as an expected rejection, recognised by its maxAllowedItems extension. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Each iteration logs in, reads the profile, refreshes the session and logs out. The refresh token cookie is handled by hand because load test clients do not keep cookies, and the newest cookie is sent after every rotation, since reusing a revoked token revokes all of the user's tokens. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Dejmenek
added this pull request to stack #168
September 29, 2026 14:09
Dejmenek
marked this pull request as ready for review
September 29, 2026 19:43
Base automatically changed from
test/165-improve-load-test-quality-and-expand-scenario-coverage
to
main
September 29, 2026 19:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the second PR for #165 and it is stacked on #166. It adds larger datasets, session helpers and three new groups of load tests: mixed browsing, expensive queries and the authentication flow.
Datasets
LoadTestDataSeedergenerates Medium (50 users, 25 tournaments) and Large (200 users, 100 tournaments) datasets. Tournaments cycle through open, closed, completed and round robin, so standings have real matches to compute. The factory seeds through an overridableSeedAsyncand exposes the tournament ids, round robin ids and user emails that scenarios pick from. Load test clients no longer handle cookies, so virtual users do not share one refresh token.Helpers
GraphQLLoadStepcan send a refresh token cookie, pass the response headers and body to a callback, and treat a GraphQL error as an expected rejection through a predicate.VirtualUserSessionslogs users in once during scenario init and picks a session per invocation.LoadTestRun.ExecuteAllruns several scenarios in one NBomber run and reports every failed threshold together.New tests
Testing
All six new load tests pass locally. This PR only changes the load test project, so the unit and integration tests are unaffected and CI will run them. The load tests need Docker and run manually with
dotnet test TournamentAPI.LoadTests --filter "Category=Load".Part of #165.
Stack created with GitHub Stacks CLI • Give Feedback 💬
🤖 Generated with Claude Code