How to integrate NUnit tests (written in C #) in TFS assemblies?

I wrote tests using Selenium in the NUnit Framework using C # language. I want to link these tests as part of a build in TFS. Therefore, whenever a new assembly is created. These tests could be run as part of the builds and generate reports by email.

+6
source share
1 answer

Recommend using the new vNext build. VNext formats are based on JSON, and you can include tasks created in msbuild, powershell, and various other scripting languages.

This blog post clearly describes how to integrate NUnit tests in TFS assemblies: Running NUnit tests in TFS 2015 Build vNext

Just summarized as follows:

  • Add Nuget Package for NUnit Test Adapter
  • Specify the path of the custom test adapter inside the assembly definition

    • Copying adapters inside the Visual Studio TestWindows folder

    • Specify the path to a custom test adapter with nunit packages

Some other recommendations for you:

xUnit or NUnit with Visual Studio Online Build

Running unit tests of nUnit and Jasmine.JS in a VFS assembly in TFS / VSO format

+5
source

Source: https://habr.com/ru/post/1012236/


All Articles