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.

Failed at the backstopjs@1.3.5 test script 'gulp test'.

See original GitHub issue

Hello,

when I run npm run test I get this error :

C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs>npm run test

> backstopjs@1.3.5 test C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs
> gulp test


BackstopJS Config loaded at location C:\Projets\Tests\backstopjs\myCoolProject\backstop.json
[15:23:40] Using gulpfile C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs\gulpfile.js
[15:23:40] Starting 'init'...
[15:23:40] Finished 'init' after 95 μs
[15:23:40] Starting 'test'...

Running CasperJS with:  [ 'capture/genBitmaps.js' ]
[15:23:40] Finished 'test' after 16 ms
CasperJS: Ready event received.
CasperJS: Current location is ../../index.html
CasperJS: Screenshots for phone (320x480)
CasperJS: Ready event received.
CasperJS: Current location is ../../index.html
CasperJS: Screenshots for tablet_v (568x1024)
CasperJS: Ready event received.
CasperJS: Current location is ../../index.html
CasperJS: Screenshots for tablet_h (1024x768)
CasperJS: Comparison config file updated.

Bitmap file generation completed.
gulp.run() has been deprecated. Use task dependencies or gulp.watch task triggering instead.
[15:23:44] Starting 'start'...
[15:23:45] Finished 'start' after 1 s
[15:23:45] Starting 'report'...
[15:23:45] Finished 'report' after 853 μs
[15:23:46] Starting 'compare'...
 OK: My Local Test 0_5_footer_0_phone.png
 OK: My Local Test 0_5_footer_1_tablet_v.png
 OK: My Local Test 0_0_nav_0_phone.png
 OK: My Local Test 0_5_footer_2_tablet_h.png
 OK: My Local Test 0_0_nav_1_tablet_v.png
 OK: My Local Test 0_0_nav_2_tablet_h.png
 OK: My Local Test 0_2_bodycol-md-4nth-of-type1_0_phone.png
 OK: My Local Test 0_3_bodycol-md-4nth-of-type2_0_phone.png
 OK: My Local Test 0_4_bodycol-md-4nth-of-type3_0_phone.png
 OK: My Local Test 0_2_bodycol-md-4nth-of-type1_2_tablet_h.png
 OK: My Local Test 0_3_bodycol-md-4nth-of-type2_2_tablet_h.png
 OK: My Local Test 0_4_bodycol-md-4nth-of-type3_2_tablet_h.png
 OK: My Local Test 0_2_bodycol-md-4nth-of-type1_1_tablet_v.png
 OK: My Local Test 0_3_bodycol-md-4nth-of-type2_1_tablet_v.png
 OK: My Local Test 0_4_bodycol-md-4nth-of-type3_1_tablet_v.png
 ERROR: My Local Test 0_1_jumbotron_0_phone.png
   See: C:\Projets\Tests\backstopjs\myCoolProject\backstop_data\bitmaps_test\20160707-152342\failed_diff_0_1_jumbotron_0_phone.png
 ERROR: My Local Test 0_1_jumbotron_1_tablet_v.png
   See: C:\Projets\Tests\backstopjs\myCoolProject\backstop_data\bitmaps_test\20160707-152342\failed_diff_0_1_jumbotron_1_tablet_v.png
[15:23:46] Starting 'openReport'...

Testing with  ../../backstop_data/bitmaps_test/compare.json
Opening report ->  http://localhost:3001/compare/

[15:23:46] Finished 'openReport' after 20 ms
 ERROR: My Local Test 0_1_jumbotron_2_tablet_h.png
   See: C:\Projets\Tests\backstopjs\myCoolProject\backstop_data\bitmaps_test\20160707-152342\failed_diff_0_1_jumbotron_2_tablet_h.png

Test completed...
 15 Passed
 3 Failed

 *** Mismatch errors found ***
For a detailed report run `npm run openReport`

[15:23:47] 'compare' errored after 943 ms
[15:23:47] Error: Mismatch errors found.
    at updateProgress (C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs\gulp\tasks\compare.js:37:22)
    at Array.<anonymous> (C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs\gulp\tasks\compare.js:77:13)
    at triggerDataUpdate (C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs\node_modules\node-resemble-js\resemble.js:69:28)
    at onceWeHaveBoth (C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs\node_modules\node-resemble-js\resemble.js:447:6)
    at null.<anonymous> (C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs\node_modules\node-resemble-js\resemble.js:125:13)
    at emitOne (events.js:77:13)
    at emit (events.js:169:7)
    at null.<anonymous> (C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs\node_modules\node-resemble-js\node_modules\pngjs\lib\png.js:52:14)
    at emitOne (events.js:77:13)
    at emit (events.js:169:7)

npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
npm ERR! node v4.4.4
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! backstopjs@1.3.5 test: `gulp test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the backstopjs@1.3.5 test script 'gulp test'.
npm ERR! This is most likely a problem with the backstopjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp test
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs backstopjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls backstopjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs\npm-debug.log

Npm-debug-log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'test' ]
2 info using npm@2.15.1
3 info using node@v4.4.4
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info pretest backstopjs@1.3.5
6 info test backstopjs@1.3.5
7 verbose unsafe-perm in lifecycle true
8 info backstopjs@1.3.5 Failed to exec test script
9 verbose stack Error: backstopjs@1.3.5 test: `gulp test`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:217:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:827:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid backstopjs@1.3.5
11 verbose cwd C:\Projets\Tests\backstopjs\myCoolProject\node_modules\backstopjs
12 error Windows_NT 10.0.10240
13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
14 error node v4.4.4
15 error npm  v2.15.1
16 error code ELIFECYCLE
17 error backstopjs@1.3.5 test: `gulp test`
17 error Exit status 1
18 error Failed at the backstopjs@1.3.5 test script 'gulp test'.
18 error This is most likely a problem with the backstopjs package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     gulp test
18 error You can get information on how to open an issue for this project with:
18 error     npm bugs backstopjs
18 error Or if that isn't available, you can get their info via:
18 error
18 error     npm owner ls backstopjs
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Thank you

Tested on latest version of Windows 10

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
garriscommented, Jul 12, 2016

Probably not. It would be more like adding a config prop e.g. suppressCliErrorMsg: true in the BackstopJS config file. Then returning a 1 if suppressCliErrorMsg is true at this spot… https://github.com/garris/BackstopJS/blob/master/gulp/tasks/compare.js#L37

1reaction
stevenbriscoecacommented, Jul 7, 2016

Additional points: the local server runs and it does discover errors when I add CSS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows: Testing script failure with "the system can not find ...
Attempting to run this on a Windows 7 Enterprise SP1 box. Both the reference gulp task (which is generating reference image files) and...
Read more >
Gulp error missing script: build in MVC project - Stack Overflow
*Warning: I have different versions of nodejs and gulp then it specified in solution. here is the package.json: { "name": "test", "version": ...
Read more >
Documentation - Gulp - TypeScript
Test the page by running gulp and then opening dist/index.html in a browser. You should see “Hello from TypeScript” on the page.
Read more >
Getting Started with Gulp.js - Semaphore Tutorial
Run tests on the code. Watch for changes in your files and act on it. Automatically reload the page in the browser after...
Read more >
A Beginners Guide to the Task Runner Gulp - Andy Carter
Hi Andy, I have a question about Gulp not being helpful in saving scripts loading time, even though the JS files have being...
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