angular / protractor

E2E test framework for Angular apps
http://www.protractortest.org
MIT License
8.75k stars 2.31k forks source link

Running specs with multiCapabilities, with cucumber tags. #4323

Closed chuan-qin closed 7 years ago

chuan-qin commented 7 years ago

Hi,

Say I have a features folder, which has 10 feature files. feature_01.feature.... feature_10.feature. And each feature has 3 scenarios, each has a (cucumber)tag. @feature_01_tag1, @feature_01_tag2, @feature_01_tag3, etc...

I was running protractor with cucumber, using protractor-cucumber-framework.

Situation 1: 1, using "suites" in protractor.conf.js 2, using "multiCapabilities" (1 chrome instance only) 3, using “cucumberOpts” with --tags @feature_03_tag3 Results: The process will ONLY pick @feature_03_tag3, and run through all its steps.

1 browser opened, 1 browser closed.

Situation 2: 1, using "specs": "features/*/.feature" in protractor.conf.js 2, using "multiCapabilities" (1 chrome instance only) 3, using “cucumberOpts” with --tags @feature_03_tag3 Results: The process will process ALL feature files, it pops up 1 browser for each feature file, and then immediately close the browser for feature file which doesn't have the tag @feature_03_tag3.

10 browser opened, 9 of them closed immediately, 1 of them process the steps in @feature_03_tag3.

Question:

Is there a difference when processing suites, and specs in the protractor.conf.js file? Does it mean protractor somehow "filter" the files before passing to cucumber?

Bug report

[09:04:18] I/testLogger - [chrome #01-0] PID: 20190 [chrome #01-0] Specs: /WORKSPACE/dixons/vagrant-waf/waf/example/features/example.feature [chrome #01-0] [chrome #01-0] (node:20190) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. [chrome #01-0] [09:04:17] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub [chrome #01-0] [09:04:18] W/runner - Ignoring unknown extra flags: cucumberOpts. This will be an error in future versions, please use --disableChecks flag to disable the Protractor CLI flag checks. [chrome #01-0] 0 scenarios [chrome #01-0] 0 steps [chrome #01-0] 0m00.000s [chrome #01-0] [WAF_DEBUG] [Handlers] AfterFeatures

[09:04:18] I/testLogger -

[09:04:18] I/launcher - 1 instance(s) of WebDriver still running

[09:04:21] I/testLogger -

[09:04:21] I/testLogger - [chrome #01-1] PID: 20354 [chrome #01-1] Specs: /WORKSPACE/dixons/vagrant-waf/waf/example/features/features_action/01_navigation.feature [chrome #01-1] [chrome #01-1] (node:20354) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. [chrome #01-1] [09:04:19] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub [chrome #01-1] [09:04:20] W/runner - Ignoring unknown extra flags: cucumberOpts. This will be an error in future versions, please use --disableChecks flag to disable the Protractor CLI flag checks. [chrome #01-1] 0 scenarios [chrome #01-1] 0 steps [chrome #01-1] 0m00.000s [chrome #01-1] [WAF_DEBUG] [Handlers] AfterFeatures

[09:04:21] I/testLogger -

[09:04:21] I/launcher - 1 instance(s) of WebDriver still running

[09:04:23] I/testLogger -

[09:04:23] I/testLogger - [chrome #01-2] PID: 20512 [chrome #01-2] Specs: /WORKSPACE/dixons/vagrant-waf/waf/example/features/features_action/02_enter_value.feature [chrome #01-2] [chrome #01-2] (node:20512) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. [chrome #01-2] [09:04:21] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub [chrome #01-2] [09:04:22] W/runner - Ignoring unknown extra flags: cucumberOpts. This will be an error in future versions, please use --disableChecks flag to disable the Protractor CLI flag checks. [chrome #01-2] 0 scenarios [chrome #01-2] 0 steps [chrome #01-2] 0m00.000s [chrome #01-2] [WAF_DEBUG] [Handlers] AfterFeatures

[09:04:23] I/testLogger -

Thank you

wswebcreation commented 7 years ago

Hi there!

Your question is about a third party module that is not part of the core of Protractor. It is better suited for StackOverflow or Gitter. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.

From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

If you are going to place it on SO please also provide the versions of cucumber and protractor-cucumber-framework in your question, maybe refer to that question in this issue and please close the issue here. I try to help you on SO.

Thanks!

chuan-qin commented 7 years ago

Moved to StackOverflow: https://stackoverflow.com/questions/44516806/protractorcucumberprotractor-cucumber-framework-using-specs-and-multicapabi