stryker-net: Stryker cannot find tests on project
Trying to get stryker to run on a VisualStudio 22 unit test project.
The unit test project uses .NET framework 4.8 with MSTest.TestFramework 2.2.10 The referenced project (engine) uses .NET framework 4.5.1
Then running
dotnet stryker --test-project Engine.Tests/Engine.Tests.csproj -p Projects/Engine/Engine.csproj -s Engine.sln
It looks like all is al right but then:
[14:16:28 INF] Analysis complete.
[14:16:28 INF] Building test project Engine.Tests\Engine.Tests.csproj (1/1)
[14:17:08 INF] Total number of tests found: Unable to detect
The tests can be started from Visual Studio so they absolutely exist.
Example test:
[TestMethod]
public void TestFMSShippingCostsInvalidDeliveryType()
{
var c = new ShippingCosts();
Dealer dealer = new Dealer {
SendByMail = false,
};
c.IsValidOrder(dealer, DateTime.Today).Should().BeFalse();
}
What to do to get stryker to find these tests?
Logs
[14:16:28 INF] Building test project Engine.Tests\Engine.Tests.csproj (1/1)
[14:17:08 INF] Total number of tests found: Unable to detect
Expected behavior
stryker finds tests
Desktop (please complete the following information):
- OS windows 10
- Type of project: unit test assembly dll
- Framework Version 4.8, 4.5.1
- Stryker Version latest
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (13 by maintainers)
I opened #2126 to discuss how to work on this.