Test | Convert OutputParameterTests to xunit assertion.#3996
Test | Convert OutputParameterTests to xunit assertion.#3996
Conversation
There was a problem hiding this comment.
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
OutputParameterTestwith an assertion-basedInvalidValueInOutputParameter_ShouldSucceedtest. - Removed the legacy
OutputParameterrunner and its associated.bslbaseline 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. |
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/OutputParameterTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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")] |
There was a problem hiding this comment.
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")] |
There was a problem hiding this comment.
This test is reliable.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/OutputParameterTests.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/OutputParameterTests.cs
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Refactors the output parameter test to replace the legacy baseline-based test with a modern, assertion-based test.