Skip to content
Advertisement

Is it possible to run vstest on a Linux machine via a release pipeline through Azure TFS

I am working on a release pipeline that should deploy our project artifacts and run tests over them. The agent is on a Ubuntu machine. So far I couldn’t find a way to run tests over Ubuntu because as microsoft docs say we should install either the Visual Studio or Visual Studio Test Platform using an installer task on the agent.

The problem is neither of them are available on a linux OS , so I am a bit stuck here wondering if there is a third option that we can use to run our tests on this agent.

Advertisement

Answer

It depends on what type of your project is. If your project is .net core, you can try dotnet core cli task. Dotnet test can cross OS. If your project is .net fx, it cannot run on linux.

Run dotnet test command in .Net Core task

enter image description here

If you are using deployment group , you can run dotnet test command in a bash task and then use a Publish Test Result task to retrun trx files that Test has generated.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement