1
votes

I have managed to get my NUnit tests running on my local machine fine with dotnet core but I'm at a loss as to how to get them running on my VSTS build server despite much google hunting.

I have found detailed instructions on using nuget package installed test adapters to run NUnit tests but these packages won't install in the dotnet core projects due to compatibility issues.

Can anyone advise or am I doomed to a life of MSTest?

1
Did you follow the instruction here? What's the detailed issue you meet when run it from VSTS? The test can be executed on VSTS but the test result cannot be read by VSTS for now just as Chris mentioned.Eddie Chen - MSFT
I eventually managed to get them to run but without any kind of visible output. I then went on a long exploratory journey with MSTest and xUnit, eventually settling on xUnit as the least painful solution for local and VSTS integration.Keith Jackson
Links to full instructions to get xUnit working along with details of the whole journey are on my other post at stackoverflow.com/q/40093573/2579219Keith Jackson

1 Answers

0
votes

VSTS doesn't currently read the results from NUnit3 - although there's an open pull request to do so - so hopefully it should soon!

dotnet-test-nunit doesn't currently produce the older NUnit 2 format that VSTS can read. As a workaround in the mean time however, I believe you can you can use NUnitLite to run core tests, which can produce results in the NUnit2 format using the --result option.

This guide explains further: http://www.alteridem.net/2015/11/04/testing-net-core-using-nunit-3/