Skip to content

Conversation

@omercnet
Copy link
Member

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, and Project & 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, and integration-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:

  • Revised RATE_LIMITING.md to 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]

Copilot AI review requested due to automatic review settings December 16, 2025 21:51
Copy link
Contributor

Copilot AI left a 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

omercnet and others added 2 commits December 17, 2025 08:41
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@omercnet omercnet requested a review from Copilot December 17, 2025 06:44
Copy link
Contributor

Copilot AI left a 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.

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.

1 participant