Integration of BackstopJS into a VSTS build pipeline

416 views Asked by At

At the moment I am trying to integrate the npm backstopjs into my VSTS build pipeline. To do this, I have to run it on an npm live server to get a screenshot of the actual build of the app and compare it to the reference screenshot. I tried to start this live server with a PowerShell script. This script cannot find the path to the npm root path so I cannot run the tests.

My question is: Is there a way to run BackstopJS tests with VSTS?

Edit

For the better understanding, here are some screenshots of my project:

The YAML and the filesystem

The package and the PowerShell

1

There are 1 answers

0
Marina Liu On BEST ANSWER

Since Hosted VS2017 agent is the build machine provided by VSTS server, you should build VSTS with the privarte agent which located in the same machine of your live-server, so that the the build project can be searched.

And more details about deploying a private agent, you can refer the document Deploy an agent on Windows.