Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Running specs with multiCapabilities, with cucumber tags. #4323

Closed
@chuan-qin

Description

@chuan-qin

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

  • Node Version: 7.10
  • Protractor Version: 5.1.2
  • Angular Version: NA
  • Browser(s): Chrome
  • Operating System and Version Ubuntu 1704
  • Your protractor configuration file
    multiCapabilities: [
    {
    browserName: "chrome",
    shardTestFiles: true,
    maxInstances: 1
    }
    ],
    allScriptsTimeout: 11000,
    getPageTimeout: 10000,
    specs: [ process.env.WAF_SPEC_PATH ],
    seleniumAddress: "http://127.0.0.1:4444/wd/hub",
    framework: "custom",
    frameworkPath: require.resolve("protractor-cucumber-framework"),
    cucumberOpts: {
    require: "features"
    }
  • A relevant example test
  • Output from running the test

[09:04:18] I/testLogger - [chrome #1-0] PID: 20190
[chrome #1-0] Specs: /WORKSPACE/dixons/vagrant-waf/waf/example/features/example.feature
[chrome #1-0]
[chrome #1-0] (node:20190) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[chrome #1-0] [09:04:17] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
[chrome #1-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 #1-0] 0 scenarios
[chrome #1-0] 0 steps
[chrome #1-0] 0m00.000s

[chrome #1-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 #1-1] PID: 20354
[chrome #1-1] Specs: /WORKSPACE/dixons/vagrant-waf/waf/example/features/features_action/01_navigation.feature
[chrome #1-1]
[chrome #1-1] (node:20354) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[chrome #1-1] [09:04:19] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
[chrome #1-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 #1-1] 0 scenarios
[chrome #1-1] 0 steps
[chrome #1-1] 0m00.000s

[chrome #1-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 #1-2] PID: 20512
[chrome #1-2] Specs: /WORKSPACE/dixons/vagrant-waf/waf/example/features/features_action/02_enter_value.feature
[chrome #1-2]
[chrome #1-2] (node:20512) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[chrome #1-2] [09:04:21] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
[chrome #1-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 #1-2] 0 scenarios
[chrome #1-2] 0 steps
[chrome #1-2] 0m00.000s

[chrome #1-2] [WAF_DEBUG] [Handlers] AfterFeatures

[09:04:23] I/testLogger -

  • Steps to reproduce the bug
  • The URL you are running your tests against (if relevant)

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions