-
Notifications
You must be signed in to change notification settings - Fork 3
test: making tests faster #135
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR restructures the integration test suite to enable parallel execution while respecting Descope API rate limits, resulting in a 2-4x speedup in CI. Tests are partitioned into 5 independent collections that can run simultaneously, with sequential execution preserved within each collection to avoid resource conflicts.
Key changes:
- Partitioned integration tests into 5 collections (Authentication, User Management, Tenant Management, Authorization, Project & Settings) with trait-based filtering
- Updated CI workflow to run tests in parallel using a matrix strategy across separate jobs
- Enabled controlled parallelization in XUnit configuration (up to 4 threads)
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
xunit.runner.json |
Enabled parallel test collection execution with a maximum of 4 threads |
IntegrationTestCollection.cs |
Replaced single collection with 5 partitioned collections for parallel execution |
| Authentication test files | Updated to use "Authentication Tests" collection and trait |
| Management test files | Distributed across User Management, Tenant Management, Authorization, and Project & Settings collections with appropriate traits |
RATE_LIMITING.md |
Updated documentation to describe the new partitioned collection strategy and expected performance improvements |
.github/workflows/ci.yaml |
Restructured into separate build, unit-test, and matrix-based integration-test jobs with artifact sharing |
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated no new comments.
This pull request restructures the integration test suite and CI workflow to improve test execution speed and maintainability while respecting Descope API rate limits. The main changes include partitioning integration tests into separate XUnit collections and CI jobs for parallel execution, updating test attributes for flexible filtering, and revising documentation to reflect the new approach.
Test organization and parallelization:
Partitioned integration tests into five XUnit collections (
Authentication Tests,User Management Tests,Tenant Management Tests,Authorization Tests, andProject & Settings Tests) to allow parallel execution of non-conflicting tests, while maintaining sequential execution within each collection. Each test class is now assigned to the appropriate collection and marked with a[Trait("Category", ...)]attribute for CI filtering. (Descope.Test/IntegrationTests/IntegrationTestCollection.cs, all test files) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]Updated the CI workflow to split testing into three jobs:
build,unit-tests, andintegration-tests, with the latter running in parallel by test category using a matrix strategy. Build artifacts are shared between jobs to avoid redundant builds. (.github/workflows/ci.yaml) [1] [2]Documentation updates:
RATE_LIMITING.mdto document the new partitioned collection strategy, trait-based filtering, and the impact on test execution times and rate limiting. (Descope.Test/IntegrationTests/RATE_LIMITING.md) [1] [2]