Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Convert xUnit tests to MSTest and increase use of traversal projects to increase build perf #605

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

barnson
Copy link
Member

@barnson barnson commented Feb 17, 2025

@barnson barnson force-pushed the bob/MSTestTraversal branch 3 times, most recently from 0603501 to 8b1989b Compare February 17, 2025 20:38
@bevanweiss
Copy link
Contributor

Is the migration from xUnit to MSTest due to extra functionality in MSTest, or an issue with xUnit?

xUnit does have support for the Microsoft Testing Platform
https://xunit.net/docs/getting-started/v3/microsoft-testing-platform

If it's just about parallel testing, it seems this could just be a case of missing parallel enabling in xUnit?
https://xunit.net/docs/configuration-files

I'm keen on having a try of this and potentially seeing how it goes with the code coverage extension.

@barnson
Copy link
Member Author

barnson commented Feb 18, 2025

Getting .exe test assemblies was a necessary part of a multiproc build. Now that xUnit supports it, I wouldn't be opposed to using it but I found MSTest to offer a better developer experience (e.g., with an MSBuild SDK).

@barnson
Copy link
Member Author

barnson commented Feb 18, 2025

@robmen The action runner VM got caught up in the long-running tests (Sql and Firewall). That's a downside of the segment scope though in this case, there's not much after ext to buffer the long-running builds. So even with 4 cores, we're not seeing big wins. We should still get some with traversal projects building everything.

@barnson barnson requested a review from robmen February 26, 2025 20:13
@barnson barnson self-assigned this Feb 26, 2025
@barnson barnson added the enhancement New feature or request label Feb 26, 2025
@barnson barnson marked this pull request as ready for review February 26, 2025 20:13
robmen
robmen previously approved these changes Mar 3, 2025
barnson added 3 commits March 3, 2025 13:35
- Move ext\ unit tests to MSTest.
- MSBuildify ext projects with MSTest execution.
- Fork test support projects for MSTest:
  - WixInternal.TestSupport
  - WixInternal.Core.TestPackage
***Does not include a full conversion to traversal projects. The wix
segment already uses traversal projects extensively so there isn't a
significant per win, especially compared to the effort required...but
MSTest's method-level parallelism cuts test run time in half (~60->~30).
@barnson barnson force-pushed the bob/MSTestTraversal branch from 8b1989b to 6ca404f Compare March 3, 2025 18:37
@robmen robmen self-requested a review March 3, 2025 18:43
@barnson barnson enabled auto-merge (rebase) March 3, 2025 18:48
@barnson barnson merged commit 3354cdb into main Mar 3, 2025
2 checks passed
@barnson barnson deleted the bob/MSTestTraversal branch March 3, 2025 19:25
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants