Visual Studio Online CI Nunit Tests not found during build

前端 未结 2 1235
陌清茗
陌清茗 2020-12-05 19:31

I have a VSO (f.k.a TFS) Git project that builds and deploys properly but can\'t find the unit tests in the solution.

This is the message I see...

No         


        
相关标签:
2条回答
  • 2020-12-05 19:53

    To run NUnit tests, the build system needs to be told where it can find the 3rd party test runner assemblies. Currently it can't load those from a Git Repository. But... It can load them from a Team Foundation Source Control folder in another Team Project. So simply create an empty project using the standard source control and reference the assemblies from there.

    In this doc, you're explained how to configure Team Build to load nUnit tests. The basic thing is that you need to copy the Test Runner assembles and stick them in a TFVC repository. You then need to tell the Build Controller where it can find these assemblies.

    The hosted build controller can load these assemblies from any team project within your VSO account, so just create a second project which can store these.

    See also:

    • http://walkingthestack.blogspot.com/2013/04/using-nunit-for-your-tests-in-team.html
    • http://www.visualstudio.com/get-started/hosted-build-controller-vs#supplemental_binaries
    0 讨论(0)
  • 2020-12-05 20:08

    Another option is to install the NUnit Test Adapter for VS2012 and VS2013 NuGet package in the unit test project. The build server will find it there. No other changes needed.

    0 讨论(0)
提交回复
热议问题