Skip to content

OSOE-1308: Migrate test SDKs to Microsoft Testing Platform - #24

Open
Piedone wants to merge 6 commits into
devfrom
issue/OSOE-1308
Open

OSOE-1308: Migrate test SDKs to Microsoft Testing Platform#24
Piedone wants to merge 6 commits into
devfrom
issue/OSOE-1308

Conversation

@Piedone

@Piedone Piedone commented Sep 5, 2026

Copy link
Copy Markdown
Member

Migrate the unit test SDK to the executable xUnit runner and Microsoft Testing Platform, including GitHub Actions reporting, TRX reports, and hang dumps. Remove VSTest dependencies and document runner selection and central package management.

The UI test SDK retains its library behavior for reusable test helpers. Executable UI test projects use Lombiq.MSBuild.OrchardCore.Tests.Sdk and reference Lombiq.Tests.UI explicitly.

Part of Lombiq/Testing-Toolbox#92. Coordinated integration: Lombiq/Open-Source-Orchard-Core-Extensions#1335.

Validation: local UI SDK packaging succeeds, and a restored UI helper consumer evaluates as a library. The coordinated SDK prerelease 2.1.1-alpha.2.osoe-1308 is published and available on NuGet. With the published SDK, the NuGet UI consumer discovers 44 tests and all 35 NuGet unit tests pass. The local root build succeeds with zero warnings/errors. SDK publication and PR checks pass.

OSOE-1308

@@ -1,5 +1,4 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)../../Lombiq.MSBuild.Base.Sdk/Sdk/Import.props" />
<Import Project="$(MSBuildThisFileDirectory)../../Lombiq.MSBuild.OrchardCore.Tests.Sdk/Sdk/Import.props" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this necessary? This SDK is afaik only used by all those *.Tests.UI libraries that contain extension methods to be used in tests rather than actual tests. So I think this would only make the test execution slower by trying to discover tests in libraries that definitely have none.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not actually. I misunderstood what this project is for and wanted to cut down on sme repetition.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Having reverted this, I'm not so sure anymore. It feels like The Tests SDK and the UI Tests SDK should be pairs. Now there's a distinction due to how we usually approach these tests (given how unit tests are just in their test project, while for UI tests we have libraries and test projects) because of their different nature. However, that should be reflected in the SDK too.

Maybe a separate SDK for the libraries?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If it wasn't such a hassle I'd rename Lombiq.MSBuild.OrchardCore.Tests.UI.Sdk to Lombiq.MSBuild.OrchardCore.Tests.UI.Library.Sdk or something along those lines.

I don't think these two need to be pairs, because if you want a project to run tests it should always have the Tests.Sdk. If you want a standalone UI test project you set the SDK to Tests.Sdk and import the Core.props (and technically the Core.targets, though that's empty rn) from Tests.UI.Sdk like this:

<Project Sdk="Lombiq.MSBuild.OrchardCore.Tests.Sdk/version">
  <Import Project="Core.props" Sdk="Lombiq.MSBuild.OrchardCore.Tests.UI.Sdk" Version="version">
  <Import Project="Core.targets" Sdk="Lombiq.MSBuild.OrchardCore.Tests.UI.Sdk" Version="version">
</Project>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm thinking that a UI test project should only import the UI test SDK, and nothing else (much like unit test projects do this with the Tests SDK). I also thought about renaming it to Library.

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.

2 participants