azure-devopsnunitazure-pipelinesvstestnunittestadapter

How do I run NUnit tests in Azure Devops without having the test adapter in every project?


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?


Solution

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

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