0

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
HANSTKE
  • 47
  • 6
  • Could you please let us know how you are triggering the build without Percy? – Tony_Stark Jun 26 '23 at 20:16
  • I am triggering it through the VsTest. Select tests using: Test assemblies. Test Files: .dll. Test results folder$(Agent.TempDirectory\TestResults. Test mix contains UI tests then I have latest selected. I do have rerun failed tests selected with 3 maximum number of attempts and upload test attachments. – HANSTKE Jun 27 '23 at 13:25

2 Answers2

1

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.

HomeLander
  • 61
  • 3
  • Homelander Where do I add the npx percy app:exec --dotnettest path/to/name-of-CSProj.csproj. I am looking to keep the VsTest.I have engaged there support they only know Percy and nothing when it comes to Microsoft Products. – HANSTKE Jun 27 '23 at 13:30
  • You can add npx percy app:exec --dotnettest path/to/name-of-CSProj.csproj as a separate step in your Azure pipeline configuration yml . You can also check their documents to integrate with Azure pipelines – HomeLander Jun 29 '23 at 02:19
  • Then I would not be running VsTest. I want to keep running VsTest. – HANSTKE Jun 29 '23 at 18:14
0

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

.

HANSTKE
  • 47
  • 6
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 13 '23 at 11:39