Unable to run .net core 2.1 unit tests on TFS

Good morning

I have a a xamarig project built against .net core 2.1 and I am trying to unit test it with a MSTest unit test project also built against .net core 2.1.

Now everything works well when I do if from VIsual Studio 2017 and all the tests are green. However, when I try to do the same with a specific TFS build step I run into troubles.

After googling it for a while I ended ut with the folllowing configuration:
1) Visual Studio Build Step
2) Path to vstest.console pointing to a folder on the build server containing a copy of the folder TestPlatform taken from the Visual Studio installation I have on my development machine (C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\TestPlatform).
3) Additional argument for for vstest.console /framework:.NETCoreApp,Version=v2.1
4) Increased the timeout as suggested from 90 to 180 seconds.

The result is that the build process gets stuck and then times out miserably. Logs attached (partially in German, sorry.)

Is there anybody out there with able to set up such a build step succesfully?

Thanks in advance for your support.

Regards

Best Answer

  • UmbgttUmbgtt ✭✭
    Accepted Answer

    Well, apparently, the issue was that different test assemblies from different test projects got mixed up. By building the test assemblies separately and having TFS test separately with different build steps the issue could be solved.

Answers

  • UmbgttUmbgtt Member ✭✭
    Accepted Answer

    Well, apparently, the issue was that different test assemblies from different test projects got mixed up. By building the test assemblies separately and having TFS test separately with different build steps the issue could be solved.

Sign In or Register to comment.