-2

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

Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107
Patrick F.
  • 35
  • 5
  • What do you mean the powershell script can not find the npm root-path? What's the build agent did you use for VSTS build? – Marina Liu Jul 10 '18 at 05:58
  • I use a Hosted VS2017 Agent ( you can see it in the Screenshots i added to my Post) and I don't know if the path is the real problem. When I navigate to the path I get with the command 'npm root' I couldn't access to the Live-Server Package. But I think this is because of the local installation of the npm install task. Is it possible, the Problem is, I can't start the Script tasks synchronous – Patrick F. Jul 10 '18 at 07:44
  • Yes, that's the problem. You should use private agent instead of Hosted agent. – Marina Liu Jul 10 '18 at 07:57
  • Does the answer helps you solve the problem? If yes, can you mark the answer by clicking √ symbol on the left of the answer. And it will also benefit other members who meet similar questions. – Marina Liu Jul 20 '18 at 08:33

1 Answers1

0

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.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74