Skip to content

Test | Convert OutputParameterTests to xunit assertion.#3996

Open
mdaigle wants to merge 2 commits intomainfrom
dev/mdaigle/convert-output-param-tests
Open

Test | Convert OutputParameterTests to xunit assertion.#3996
mdaigle wants to merge 2 commits intomainfrom
dev/mdaigle/convert-output-param-tests

Conversation

@mdaigle
Copy link
Contributor

@mdaigle mdaigle commented Mar 3, 2026

Refactors the output parameter test to replace the legacy baseline-based test with a modern, assertion-based test.

Copilot AI review requested due to automatic review settings March 3, 2026 00:30
@github-project-automation github-project-automation bot moved this to To triage in SqlClient Board Mar 3, 2026
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

Refactors the manual output-parameter scenario from a baseline-file comparison approach to a direct xUnit assertion-based test in the SqlClient manual test suite.

Changes:

  • Replaced baseline-driven OutputParameterTest with an assertion-based InvalidValueInOutputParameter_ShouldSucceed test.
  • Removed the legacy OutputParameter runner and its associated .bsl baseline artifacts from the manual test project.
  • Updated the ManualTests project file to stop compiling/copying the removed baseline-based assets.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/OutputParameter_ReleaseMode_Azure.bsl Removed baseline content (baseline-based verification no longer used).
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/OutputParameter_ReleaseMode.bsl Removed baseline content (baseline-based verification no longer used).
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/OutputParameter_DebugMode_Azure.bsl Removed baseline content (baseline-based verification no longer used).
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/OutputParameter_DebugMode.bsl Removed baseline content (baseline-based verification no longer used).
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/OutputParameterTests.cs Converted test to direct command execution + xUnit assertion.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/OutputParameter.cs Removed legacy console-output-based test runner.
src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj Removed compilation/content entries for deleted baseline-based artifacts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note how these baseline files are identical. This will remain true for most of the other tests to come. Only one or two relied on debug/azure specific behavior.

/// Tests for output parameters.
/// These tests run independently with their own baseline comparison.
/// </summary>
[Collection("ParameterBaselineTests")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't create any custom tables or types, so it shouldn't interfere with the other baseline tests.

_connStr = DataTestUtility.TCPConnectionString;
}

[Trait("Category", "flaky")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is reliable.

@mdaigle mdaigle changed the title Convert OutputParameterTests to xunit assertion. Test | Convert OutputParameterTests to xunit assertion. Mar 3, 2026
@mdaigle mdaigle marked this pull request as ready for review March 3, 2026 00:36
@mdaigle mdaigle requested a review from a team as a code owner March 3, 2026 00:36
Copilot AI review requested due to automatic review settings March 3, 2026 00:36
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 7 out of 7 changed files in this pull request and generated 2 comments.

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.09%. Comparing base (4f483f6) to head (304931e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3996      +/-   ##
==========================================
- Coverage   72.03%   67.09%   -4.94%     
==========================================
  Files         287      282       -5     
  Lines       43149    67171   +24022     
==========================================
+ Hits        31083    45071   +13988     
- Misses      12066    22100   +10034     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 67.09% <ø> (?)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

2 participants