gruntjs - CSS Visual Regession Testing with BackdropJS - could not run grunt:reference or grunt:test -


i tried following tutorial link on setting backstop.js

https://joe-watkins.io/css-visual-regression-testing-with-grunt-backstopjs/

i followed instructions required.

but i'm running error onscreen.

andy.cmwong@onlm4800gr8ln32 /c/backstop_test $ grunt backstop:reference running "backstop:reference" (backstop) task [12:16:30] using gulpfile c:\backstop_test\bower_components\backstopjs\gulpfile.js [12:16:30] starting 'clean'... bitmaps_reference cleaned. [12:16:30] starting 'bless'... [12:16:30] finished 'clean' after 9.82 ms [12:16:30] finished 'bless' after 15 ms [12:16:30] starting 'reference'... [12:16:30] starting 'init'... [12:16:30] finished 'init' after 73 μs [12:16:30] starting 'test'...  generating reference files.  [12:16:30] finished 'test' after 4.03 ms reference has run. [12:16:30] finished 'reference' after 5.24 ms  testing script failed code: 1  looks error occured. may want try running `$ gulp echo`. echo requested test url output console. can check output verify file requested inde ed being received in expected format.    cp: cannot stat `./bitmaps_reference': no such file or directory  error: error: command failed: c:\windows\system32\cmd.exe /s /c "cp -rf ./bitmaps_reference c:\backstop_test\tests" cp: cannot stat `./bitmaps_reference': no such file or directory 

earlier, there additional error states gulp.run() deprecated suggested need use npm module execute tasks in sequence, led me this.

https://www.npmjs.com/package/run-sequence

and managed resolved so

//under bower_components/gulp/tasks/reference.js var gulp = require('gulp'); var runsequence = require('run-sequence').use(gulp);  //first clean reference dir.  test gulp.task('reference', ['clean','bless'], function() {     //gulp.run('test');     runsequence('test');     console.log('reference has run.'); }); 

it works.

however, i'm still not able complete grunt/gulp tasks execution i'm stuck this.

i'm wondering has tried following tutorial link above , managed succeed in getting backstopjs work?

your input on appreciated.

update

i forgot show grunt config setup looks like.

........................  grunt.initconfig({      backstop: {         setup: {             options : {                 backstop_path: './bower_components/backstopjs',                 test_path: './tests',                 setup: false,                 configure: true             }         },         test: {             options : {                 backstop_path: './bower_components/backstopjs',                 test_path: './tests',                 create_references: false,                 run_tests: true             }         },         reference: {             options : {                 backstop_path: '/bower_components/backstopjs',                 test_path: './tests',                 create_references: true,                 run_tests: false             }         }     }  }); ......................etc 

my backstop.json file

{   "viewports": [     {       "name": "phone",       "width": 320,       "height": 480     },     {       "name": "tablet_v",       "width": 568,       "height": 1024     },     {       "name": "tablet_h",       "width": 1024,       "height": 768     }   ],   "scenarios": [     {       "label": "http://getbootstrap.com",       "url": "http://getbootstrap.com",       "hideselectors": [],       "removeselectors": [         "#carbonads-container"       ],       "selectors": [         "header",         "main",         "body .bs-docs-featurette:nth-of-type(1)",         "body .bs-docs-featurette:nth-of-type(2)",         "footer",         "body"       ],       "readyevent": null,       "delay": 500,       "mismatchthreshold" : 0.1     }   ] } 

i managed working last night when got onto linux box(vmware build), redo backstopjs setup , perform test runs.

i did have original suspicion window os environment wasn't set may have reinstall npm/node/backstop etc, , have resolved there.

all now.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -