question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BackstopJS reference error

See original GitHub issue

When i try run local CasperJS script with BackstopJS I get error:

Command reference ended with an error after [0.024s] COMMAND | Error: ‘echo’ is not defined on a target object.

This happend on every method (echo, then, thenOpen, etc.).

module.exports = function(casper, scenario, vp) { casper.echo(“Hello world”); };

Can anyone helps me ?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
garriscommented, Sep 22, 2017

@mirec810 Thank you for posting this! I just noticed an error in the sample phantom test. It is pointing to the wrong onBefore and onReady directories. I will post a fix for this.

1reaction
laubsaugercommented, Sep 20, 2017

@mirec810 You are using chrome as the browser engine but you are trying to use casper in your script. casper will only work if your browser engine is phantomjs. You have to use chromy syntax for the chrome engine.

See here for example https://github.com/garris/BackstopJS/blob/master/test/configs/backstop_data/engine_scripts/chromy/overrideCSS.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

backstopjs - npm
backstop test : BackstopJS creates a set of test screenshots and compares them with your reference screenshots.
Read more >
Highest scored 'backstop.js' questions - Stack Overflow
I'm using backstop to test my app, but it fails on random test with message like COMMAND | Command `test` ended with an...
Read more >
Testing Your Website for Visual Regressions With BackstopJS
This article explains how to set up BackstopJS visual regression tests and some good practices I've picked up from using it in anger....
Read more >
Quickly compare two environments for visual errors - Beech.it
If you have this installed, we can download BackstopJS with NPM. ... As soon as you give this command, Backstop makes screenshots of...
Read more >
Automated Visual Regression Testing with BackstopJS
If there's any failure, we could see the errors in command-line window. Modify the backstop.json & rerun the reference command until getting a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found