xUnit tests do not appear on tfs

落花浮王杯 提交于 2019-12-09 13:39:53

问题


locally tests and works. but it does not see the tfs te on the server and it does not work. I can not see the xUnit test in Tfs and I can not work with it. TFS version 2017

--- Solition----


回答1:


For normal project, you could directly use Visual Studio Test task in the build pipeline.

You could try to explicitly specific the path to the xunit runner. Such as

$(System.DefaultWorkingDirectory)\packages\xunit.runner.visualstudio.2.2.0\build\_common)

And Szeki's comment is right, xUnit test runner can only be run in an assembly targeting .NET 4.5.2 or above, otherwise it cannot be loaded (and thus the tests will not be found). Take a look at this question: Running xunit.net tests in VSTS

If you are working with .net core project, you should use .net core command line to run the test instead of VStest. Details info please refer below blog:

  • Publish Core XUnit Test Results in VSTS
  • VSTS Configuration to run xUnit tests for x64 platform


来源:https://stackoverflow.com/questions/47546562/xunit-tests-do-not-appear-on-tfs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!