yahoo / protractor-retry

Use protractor features to automatically re-run failed tests with a specific configurable number of attempts.
MIT License
28 stars 32 forks source link

“Cannot find modules” error when using protractor retry #44

Closed OuyangDanwen closed 5 years ago

OuyangDanwen commented 6 years ago

Hi, I have recently integrated protractor retry to my end-to-end testing. However, it gives error every time if retry occurs. The output is shown below.


1) campaign design - campaign configuration + graph displays "email delivery failure" in pop-up when user clicks on message box

Executed 1 of 102 specs (1 FAILED) (101 SKIPPED) in 12 secs. [22:45:55] I/launcher - 0 instance(s) of WebDriver still running [22:45:55] I/launcher - chrome #01 failed 1 test(s) [22:45:55] I/launcher - overall: 1 failed spec(s)

Re-running tests , attempt : 1 Re-running the following test files : /Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-clone-test.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-clone.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-create.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-design.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-list.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-version-list.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-view-version.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-view.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.test-consumer-create.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.test-consumer-list.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.test-run-view.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.test-summary.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/segmentation/app.segmentation.e2e-spec.ts

Your global Angular CLI version (6.0.8) is greater than your local version (1.6.7). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false". The option '--retry' is not registered with the e2e command. Run ng e2e --help for a list of supported options. The option '--disableChecks' is not registered with the e2e command. Run ng e2e --help for a list of supported options. NG Live Development Server is listening on localhost:49153, open your browser on http://localhost:49153/ Date: 2018-08-01T14:46:17.095Z Hash: a7c0b011aad12ce7e591 Time: 16777ms chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered] chunk {main} main.bundle.js, main.bundle.js.map (main) 1.06 MB [initial] [rendered] chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 592 kB [initial] [rendered] chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 701 kB [initial] [rendered] chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 9.79 MB [initial] [rendered] (node:84133) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

webpack: Compiled successfully. [22:46:17] W/driverProviders - Using driver provider directConnect, but also found extra driver provider parameter(s): seleniumServerJar [22:46:17] I/launcher - Running 1 instances of WebDriver [22:46:17] I/direct - Using ChromeDriver directly... [22:46:17] E/launcher - Error: Error: Cannot find module '/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-clone-test.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-clone.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-create.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-design.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-list.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-version-list.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-view-version.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.campaign-view.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.test-consumer-create.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.test-consumer-list.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.test-run-view.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/campaign-management/app.test-summary.e2e-spec.ts,/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/e2e/segmentation/app.segmentation.e2e-spec.ts' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15) at Function.Module._load (internal/modules/cjs/loader.js:520:25) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at /Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/jasmine/lib/jasmine.js:93:5 at Array.forEach () at Jasmine.loadSpecs (/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/jasmine/lib/jasmine.js:92:18) at Jasmine.execute (/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/jasmine/lib/jasmine.js:197:8) at /Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/protractor/built/frameworks/jasmine.js:132:15 at Function.promise (/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/protractor/node_modules/q/q.js:682:9) at /Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/protractor/built/frameworks/jasmine.js:104:14 at _fulfilled (/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/protractor/node_modules/q/q.js:834:54) at /Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/protractor/node_modules/q/q.js:863:30 at Promise.promise.promiseDispatch (/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/protractor/node_modules/q/q.js:796:13) at /Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/protractor/node_modules/q/q.js:556:49 at runSingle (/Users/douyang/Downloads/Loyalty/pfopt-camp-manage-ui/node_modules/protractor/node_modules/q/q.js:137:13) [22:46:17] E/launcher - BUG: launcher exited with 1 tasks remaining [22:46:17] E/launcher - Process exited with error code 100

It seems that protractor does not recognize the paths correctly. But in fact, other than being absolute paths, the test file paths from the xml file are indeed correct. Any idea on the error? Thanks in advance.

dreuxl commented 6 years ago

mmmh

this line

The option '--retry' is not registered with the e2e command. Run ng e2e --help for a list of supported options.

is a concern to me.

look like you are using a wrapper around protractor CLI and this wrapper doesn't like the --retry command we are constructing dynamically. your wrapper has probably a given list of options and this list is not open to new options, hence failing.

dreuxl commented 5 years ago

no tractions on this one, please reopen if it s still an issue with latest release of the pkg