How Can I run VsTest Runner with Percy in Azure Pipelines

128 Views Asked by At

I figured out how to run it with DotNet Test. BUt I do not know where or what to put the info in VsTest. From the Command Line:

npm install --save-dev @percy/cli
set PERCY_TOKEN=TOKEN
npm install -g @percy/cli@latest
npx percy app:exec -- dotnet test name of CSProj
2

There are 2 best solutions below

1
On BEST ANSWER

I use a Windows machine with VsTest.Adding a Step to install npm. This will install npm for you. Then add a command Step using:

start /B npx percy app:exec start

. After that run your tests. After that use a step that stops the Percy

npx percy app:exec stop

.

3
On

I see you already have the commands. You can use the following steps to run your vsTest runner with Percy on Azure pipelines:

  1. Installing the Percy CLI

    npm install --save-dev @percy/cli npm install -g @percy/cli@latest

  2. Next step should be to set your Percy's project token

    set PERCY_TOKEN=TOKEN

  3. Then run your vsTest with Percy

    npx percy app:exec -- dotnet test path/to/name-of-CSProj.csproj

These are the steps to be added in your Azure pipeline configuration file, I hope after following this you should be able to run your test without any issue. If you still face any issue after that maybe you can reach out to their support team for help.