testfx icon indicating copy to clipboard operation
testfx copied to clipboard

Add `VSTestBridge` msbuild capability for VS and runsetting handling

Open MarcoRossignoli opened this issue 1 year ago • 2 comments

We should announce to VS if pass or not the runsetting. If adapter is using the VSTestBridge it's handled automatically, otherwise is ignored. ~~This means rename also the --settings to something mode specific --runsettings or at least have it fixed and hidden to let VS to correctly compose.~~

MarcoRossignoli avatar Aug 19 '24 09:08 MarcoRossignoli

Could you give a little more details of what would need to be done? Create a capability? Transfer it in server mode? ...

Could we reuse https://github.com/microsoft/testfx/blob/main/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Capabilities/IVSTestFlattenedTestNodesReportCapability.cs?

Evangelink avatar Aug 22 '24 20:08 Evangelink

Could you give a little more details of what would need to be done? Create a capability? Transfer it in server mode? ...

We need to set a capability in MSBuild props for that extension so VS can take it and decide if pass or not the runsettings.

MarcoRossignoli avatar Aug 23 '24 08:08 MarcoRossignoli

We need to set a capability in MSBuild props for that extension so VS can take it and decide if pass or not the runsettings.

This is going to be problematic for now as xunit uses the runsettings env variable (and it doesn't use the bridge) to decide whether or not source info should be calculated.

I also think that VSTestBridge should be killed, we should move MSTest's MTP implementation away from the bridge, and push NUnit and Expecto to move as well.

Youssef1313 avatar Jun 05 '25 16:06 Youssef1313

UPDATE: xunit will no longer rely on the runsettings env variable in xunit.v3 3.x as they switched to using caller info attributes. However, I think the bridge should be completely killed eventually. So I still feel we shouldn't do anything here for now.

Should we close this?

Youssef1313 avatar Jun 16 '25 06:06 Youssef1313

I also think that VSTestBridge should be killed, we should move MSTest's MTP implementation away from the bridge, and push NUnit and Expecto to move as well.

This

MarcoRossignoli avatar Jun 16 '25 07:06 MarcoRossignoli