Skip to content

VSTestBridge+MSTest: Use TestMethodIdentifierProperty and stop sending VSTest-specifics - #5409

Merged
Youssef Fahmy (Youssef1313) merged 24 commits into
mainfrom
dev/ygerges/testmethodidentifier
Apr 25, 2025
Merged

Youssef Fahmy (Youssef1313) merged 24 commits into
mainfrom
dev/ygerges/testmethodidentifier

Conversation

@Youssef1313

@Youssef1313 Youssef Fahmy (Youssef1313) commented Apr 7, 2025 •

Copy link
Copy Markdown
Member

Fixes #5406

Artur Spychaj (@drognanar) Any concerns?

  • MSTest won't use the capabilities implementation of the bridge so that it removes vstestProvider (we still keep it for NUnit and Expecto)
  • When a framework of the VSTestBridge uses vstestProvider, everything is the same as today.
  • When a framework of the VSTestBridge doesn't use vstestProvider (i.e, MSTest for now), we expect ManagedType/ManagedMethod to be present. In that case, we parse them via AdapterUtilities to construct TestMethodIdentifierProperty.
  • We stop serializing location.namespace completely. And include both the namespace and type name of TestMethodIdentifierProperty in location.type.

At least for MSTest, ManagedMethod has parameter types, while FullyQualifiedName doesn't. So, prefer ManagedMethod/ManagedType when they are set.
@Youssef1313
Youssef Fahmy (Youssef1313) marked this pull request as draft April 7, 2025 15:43
@Youssef1313
Youssef Fahmy (Youssef1313) force-pushed the dev/ygerges/testmethodidentifier branch from e21d711 to f6c9ff8 Compare April 16, 2025 09:56
@Youssef1313
Youssef Fahmy (Youssef1313) force-pushed the dev/ygerges/testmethodidentifier branch from cc314ba to 16615b4 Compare April 18, 2025 20:44
@Youssef1313
Youssef Fahmy (Youssef1313) force-pushed the dev/ygerges/testmethodidentifier branch from 16615b4 to fb351b6 Compare April 18, 2025 20:47
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Apr 18, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 87.36842% with 24 lines in your changes missing coverage. Please review.

Project coverage is 76.21%. Comparing base (caeb624) to head (f8103b5).
Report is 88 commits behind head on main.

Files with missing lines Patch % Lines
...ons.VSTestBridge/VSTestBridgedTestFrameworkBase.cs 0.00% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5409      +/-   ##
==========================================
- Coverage   76.24%   76.21%   -0.04%     
==========================================
  Files         603      602       -1     
  Lines       36420    36530     +110     
==========================================
+ Hits        27770    27840      +70     
- Misses       8650     8690      +40     
Flag Coverage Δ
Debug 76.21% <87.36%> (-0.04%) ⬇️
integration 76.21% <87.36%> (-0.04%) ⬇️
production 76.21% <87.36%> (-0.04%) ⬇️
unit 76.21% <87.36%> (-0.04%) ⬇️

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

Files with missing lines Coverage Δ
...latformAdapter/TestApplicationBuilderExtensions.cs 100.00% <100.00%> (ø)
...abilities/VSTestBridgeExtensionBaseCapabilities.cs 100.00% <ø> (ø)
...STestBridge/ObjectModel/FrameworkHandlerAdapter.cs 63.15% <100.00%> (+4.82%) ⬆️
....VSTestBridge/ObjectModel/ObjectModelConverters.cs 94.59% <100.00%> (+1.78%) ⬆️
...Bridge/ObjectModel/TestCaseDiscoverySinkAdapter.cs 82.60% <100.00%> (+2.60%) ⬆️
...uests/VSTestDiscoverTestExecutionRequestFactory.cs 85.71% <100.00%> (+5.71%) ⬆️
...e/Requests/VSTestRunTestExecutionRequestFactory.cs 85.18% <100.00%> (+5.18%) ⬆️
...ft.Testing.Platform/Messages/TestNodeProperties.cs 92.38% <ø> (ø)
...t.Testing.Platform/ServerMode/JsonRpc/Json/Json.cs 89.48% <100.00%> (+0.03%) ⬆️
...Platform/ServerMode/JsonRpc/SerializerUtilities.cs 91.82% <100.00%> (+0.02%) ⬆️
... and 1 more

... and 6 files with indirect coverage changes

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

@Youssef1313
Youssef Fahmy (Youssef1313) marked this pull request as ready for review April 18, 2025 22:13
@Youssef1313

Copy link
Copy Markdown
Member Author

Amaury Levé (@Evangelink) I addressed your review 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.

VSTestBridge doesn't use TestMethodIdentifierProperty

6 participants