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.

Exclude in multiCapabilities #1230

Closed
Closed
@alecxe

Description

@alecxe

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions