Visual Studio Online CI Nunit Tests not found during build

前端 未结 2 1241
陌清茗
陌清茗 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

提交回复
热议问题