hitode909/backstop-retry-failed-scenarios

Unable to use command backstop-retry-failed-scenarios with custom json

sreeram1985 opened this issue · 2 comments

When I try to run retry I get below error

retry % backstop-retry-failed-scenarios --retry 5 --config="retry.json"
Running(1/5) backstop test

BackstopJS v5.3.0

# internal/modules/cjs/loader.js:883

throw err;

^

Error: Cannot find module '/Users/***/Desktop/backstop_latest/retry/backstop.json'

Require stack:

- /usr/local/lib/node_modules/backstopjs/core/util/makeConfig.js

- /usr/local/lib/node_modules/backstopjs/core/runner.js

- /usr/local/lib/node_modules/backstopjs/cli/index.js

at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)

at Function.resolve (internal/modules/cjs/helpers.js:94:19)

at loadProjectConfig (/usr/local/lib/node_modules/backstopjs/core/util/makeConfig.js:44:36)

at makeConfig (/usr/local/lib/node_modules/backstopjs/core/util/makeConfig.js:62:38)

at module.exports (/usr/local/lib/node_modules/backstopjs/core/runner.js:5:16)

at main (/usr/local/lib/node_modules/backstopjs/cli/index.js:40:5)

at Object. (/usr/local/lib/node_modules/backstopjs/cli/index.js:8:1)

at Module._compile (internal/modules/cjs/loader.js:1063:30)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

at Module.load (internal/modules/cjs/loader.js:928:32) {

code: 'MODULE_NOT_FOUND',

requireStack: [

'/usr/local/lib/node_modules/backstopjs/core/util/makeConfig.js',

'/usr/local/lib/node_modules/backstopjs/core/runner.js',

'/usr/local/lib/node_modules/backstopjs/cli/index.js'

]

}

@hitode909 can you please help with above question.

@sreeram1985

  1. Please ensure that you have retry.json.
% ls | grep retry.json
retry.json
  1. Please ensure that your config is valid as JSON.
% cat retry.json | jq .
  1. Please ensure that you can run tests with backstopJS, without backstop-retry-failed-scenario.
% backstop test --config="retry.json"

Thank you.