Skip to content

Add Stress Tests to CI #3558

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add Stress Tests to CI #3558

wants to merge 3 commits into from

Conversation

paulmedynski
Copy link
Contributor

@paulmedynski paulmedynski commented Aug 12, 2025

Description

Adding stress tests runs to CI. These will use 1ES images for Windows and Linux, and Azure Pipelines macos-latest for macOS. All tests run against a locally installed SQL Server using SQL auth.

CI pipelines disable stress tests by default. You can manually run the pipelines with stress tests enabled.

@paulmedynski paulmedynski added this to the 7.0-preview1 milestone Aug 12, 2025
Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.16%. Comparing base (55cc333) to head (17c37c4).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3558      +/-   ##
==========================================
+ Coverage   59.44%   67.16%   +7.72%     
==========================================
  Files         268      274       +6     
  Lines       62160    62478     +318     
==========================================
+ Hits        36950    41963    +5013     
+ Misses      25210    20515    -4695     
Flag Coverage Δ
addons 90.82% <ø> (?)
netcore 69.16% <ø> (+6.95%) ⬆️
netfx 69.80% <ø> (+6.51%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Added config file path configuration via STRESS_CONFIG_FILE environment variable.
- Added support for JSON config file.
- Fixed process exit code to reflect success vs failure.
- Added emission to console.
- Added emission of data source.
- Added EntraId password-based auth.
- Added CI stage.
- Added NuGet package version to MDS assembly.
- Added dotnet build configuration pararmeter to CI entry points.
- Added MDS package version configurability to stress tests.
- Added all target frameworks that MDS supports.
- Each test run now creates and drops its own database to avoid collisions.
- Moved to 1ES images where possible.
- Using a local SQL Server that we setup as part of CI.
@paulmedynski paulmedynski marked this pull request as ready for review August 13, 2025 19:08
@Copilot Copilot AI review requested due to automatic review settings August 13, 2025 19:08
@paulmedynski paulmedynski requested a review from a team as a code owner August 13, 2025 19:08
@paulmedynski paulmedynski changed the title [DRAFT] Add Stress Tests to CI Add Stress Tests to CI Aug 13, 2025
Copy link
Contributor

@Copilot 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 adds stress test execution to the CI pipeline for Microsoft.Data.SqlClient. The stress tests will run against Azure SQL database using existing infrastructure with EntraId username/password authentication.

Key changes:

  • Creates new CI pipeline stages and jobs to build and run stress tests across multiple platforms (Windows, Linux, macOS)
  • Modernizes the stress test framework with JSON configuration support, multi-target framework builds, and dynamic database creation
  • Implements comprehensive stress test automation that can run against both local SQL Server instances and cloud databases

Reviewed Changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/targets/GenerateThisAssemblyCs.targets Adds NuGetPackageVersion constant for version tracking
eng/pipelines/stages/stress-tests-ci-stage.yml New CI stage template for orchestrating stress tests across platforms
eng/pipelines/jobs/stress-tests-ci-job.yml New CI job template for building and running stress tests on specific platforms
eng/pipelines/dotnet-sqlclient-ci-*.yml Updates core CI pipelines to include stress test stages
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.*/*.csproj Modernizes project files to use centralized configuration
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Framework/StressConfigReader.cs Adds JSON configuration file support alongside existing XML
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Tests/SqlClientStressFactory.cs Implements database creation/deletion and EntraId authentication support
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Runner/Program.cs Enhances CLI with console output option and MDS version reporting
src/Microsoft.Data.SqlClient/tests/StressTests/Directory.*.props Adds centralized build configuration for all stress test projects
src/Microsoft.Data.SqlClient/tests/StressTests/Readme.md Updates documentation with current framework support and usage instructions

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

- Added top-level pipeline flag to enable stress tests, deafult is false until tests are reliably passing.
- Addressed Copilot suggestions.
@paulmedynski
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@paulmedynski
Copy link
Contributor Author

paulmedynski commented Aug 15, 2025

The latest CI-SqlClient run for this PR is all green:
https://sqlclientdrivers.visualstudio.com/public/_build/results?buildId=122986&view=results
GitHub is confused and reporting unrelated status from a manual run of CI from this branch.

This PR can be merged once approved.

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