JetBrains / TeamCity.VSTest.TestAdapter

Apache License 2.0
30 stars 14 forks source link

Tests only run once #4

Closed mvinca closed 7 years ago

mvinca commented 7 years ago

I have a test project in TeamCity that includes one xUnit.NET test and one nUnit 3 test. (The idea originally was trying to get nUnit working in .NET Core and being able to fall back to xUnit if we didn't get there.) Using pre-alpha nUnit, I can now run tests in .NET Core. When the project runs for the very first time on TeamCity, TeamCity tells me that 2 tests passed. All subsequent runs, however, only tell me that 1 test passes (the xUnit test). It mentions nothing about the nUnit test, as if it doesn't exist. This is true even if I have the "Clean working directory" option in TeamCity turned on. Sorry I don't have more detail than this, but I'm happy to provide more if you have an area I should look for.

NikolayPianikov commented 7 years ago

@mvinca could you share csproj files for testing projects or some simple solution to reproduce your scenario?

mvinca commented 7 years ago

I couldn't reproduce in exactly the same way I stated, but in this sample project (https://github.com/mvinca/tc-sample-test.git) I found that my xUnit tests will hide my NUnit tests. (Take off the public modifier on the xUnit test, and TeamCity will see the 3 NUnit tests. Put it back on, and TeamCity will only see the one xUnit test.)

Hope that helps.

NikolayPianikov commented 7 years ago

Fixed, please use https://www.nuget.org/packages/TeamCity.VSTest.TestAdapter/1.0.3