BackstopJS icon indicating copy to clipboard operation
BackstopJS copied to clipboard

Remote Service Documentation

Open fuhlig opened this issue 6 years ago • 4 comments

Currently there is no documentation on the remote service, despite being available via the CLI. While there is active work on this (e.g. approve button, which sound really great), I can't really try it out, give feedback and potentially contribute.

If you require assistence, I'd be happy to contribute. Thanks in advance.

fuhlig avatar Mar 04 '20 21:03 fuhlig

Backstop-Remote

Description:

Backstop-Remote exposes BackstopJS CLI commands as an HTTP Web service, enabling browser-UI client interactions (e.g. hosted backstop reports, approve button interactions, etc.) with a local or remote instance of BackstopJS. Additionally, Backstop-Remote provides an interface for BackstopJS to interact as a slave web-app screenshot renderer and comparison engine for other JS-based testing and or development frameworks (e.g. Ember, Testem, Cypress, Storybook, etc.)

Workflow:

Starting the Backstop-Remote service

On the CLI...

backstop remote --config=<optional-some-backstop-config>

In a node app you might do something like this...

    backstopjs('remote', {
      config: commandOptions.config, 
      filter: commandOptions.filter
    });

Stopping the service

Doesn't get more restful than this...

http://<backstopHost>/stop/

Usage in CI env

Just start the service and ensure the host name and port are hit able inside your CI boundary.

For more info...

See: https://github.com/garris/ember-backstop

garris avatar Mar 05 '20 07:03 garris

I'm fiddling around with the remote feature using the docker container. I'm able to execute /stop and /version, but I cannot figure out how to access or open the report for the given configuration.

I also had a look at /remote/index.js and tried to use /dview/:testId/:scenarioId, but to no avail. I always get the response "Cannot GET /" (respectively "Cannot GET /").

Any hints on how to create and/or access the report?

WBTMagnum avatar Feb 14 '24 13:02 WBTMagnum

Thanks for the swift reply. That pushed me in the right direction. Besides the correct URL I was missing the "test" run for the report to be generated. All fine now.

WBTMagnum avatar Feb 14 '24 21:02 WBTMagnum