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

Exclude in multiCapabilities #1230

Closed
alecxe opened this issue Aug 23, 2014 · 2 comments
Closed

Exclude in multiCapabilities #1230

alecxe opened this issue Aug 23, 2014 · 2 comments

Comments

@alecxe
Copy link
Contributor

alecxe commented Aug 23, 2014

It is possible to specify capability-specific specs:

multiCapabilities: [
    {
        browserName : 'chrome'
    },
    {
        browserName : 'chrome',
        chromeOptions: {
            prefs: {
                'profile.default_content_settings.cookies': 2
            }
        },
        specs: [
            'footer.spec.js'
        ]
    }
],

And it is possible to specify exclude "globally":

specs: [
    '*.spec.js'
],
exclude: [
    'footer.spec.js'
],

But, it appears that specifying exclude on a capability-level doesn't work? Missing functionality?

The use case: I would like to run a specific spec in a specific browser with specific capabilities, other tests/specs should run on a different browser. In other words, I need to exclude one spec from running on one capability and set it to run on a different one. Currently, since I have a simple case, I can proceed with setting exclude on a global level, but what if I have more capabilities and tests to exclude?

Current configuration:

exports.config = {
    seleniumAddress: 'http://localhost:4444/wd/hub',

    specs: [
        '*.spec.js'
    ],
    exclude: [
        'footer.spec.js'
    ],

    multiCapabilities: [
        {
            browserName : 'chrome'
        },
        {
            browserName : 'chrome',
            chromeOptions: {
                prefs: {
                    'profile.default_content_settings.cookies': 2
                }
            },
            specs: [
                'footer.spec.js'
            ]
        }
    ],

    framework: 'jasmine',

    baseUrl: 'http://localhost:9001',

    jasmineNodeOpts: {
        showColors: true,
        isVerbose: true,
        includeStackTrace: true
    }
};

Hope that makes sense. Thanks.

hvdb pushed a commit to hvdb/protractor that referenced this issue Sep 25, 2014
Add the option to exclude spec files for a specific capability.
This way you can ignore spec files for one capability only.
For example if the test is known to fail in the capability.

Closes angular#1230
hvdb pushed a commit to hvdb/protractor that referenced this issue Sep 30, 2014
Add the option to exclude spec files for a specific capability.
This way you can ignore spec files for one capability only.
For example if the test is known to fail in the capability.

Closes angular#1230
hvdb pushed a commit to hvdb/protractor that referenced this issue Sep 30, 2014
Add the option to exclude spec files for a specific capability.
This way you can ignore spec files for one capability only.
For example if the test is known to fail in the capability.

Closes angular#1230
@juliemr juliemr closed this as completed in 0626963 Oct 1, 2014
@alecxe
Copy link
Contributor Author

alecxe commented Oct 1, 2014

@juliemr wonderful! Thank you!

@alecxe
Copy link
Contributor Author

alecxe commented Nov 18, 2014

@juliemr confirming, works for me. Thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants