0

My team has many test projects containing NUnit tests (version 3). We do not use the Visual Studio test runner and we do not have the test adapter (NUnit3TestAdapter) referenced in any of our projects. How can we run our tests in an Azure Devops build pipeline without going through all projects to add the test adapter reference?

NJS
  • 306
  • 2
  • 10

2 Answers2

2

We solved the problem by adding the following task to our pipeline, before the VSTest task:

- task: CmdLine@2 inputs: script: 'nuget install NUnit3TestAdapter'

NJS
  • 306
  • 2
  • 10
0

You can add nuget package to yor projects, but you don't have to go project by project. You can add it in single step.

Please take a look here: NuGet for solutions with multiple projects

Krzysztof Madej
  • 13,194
  • 6
  • 28
  • 50
  • We have many test projects and also many solutions, so that would still require many manual updates. Beyond that, we will be creating more solutions and test projects in the future. I don't want everyone on the team to have to remember to add that reference to every future test project. – NJS Apr 17 '20 at 18:38