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.

Support for maxSessions in multiCapabilities with shardTestFiles #1421

@smhc

Description

@smhc

The shardTestFiles option is a useful feature, however it can cause test failures when running specs that can't run in parallel against a common server. This may be bad practice for the tests, nonetheless the tests run fine when run sequentially.

We still have plenty of 'read only' specs that can run in parallel however. What we'd like to do is run a set of 'read only' tests in parallel against the server then a set of 'read write' tests sequentially, but not have the 'read only' and 'read write' tests running at the same time.

For example it might be implemented by adding a 'maxSessions' per capability, something like (commented out pseudo options):

    multiCapabilities: [
        {
            shardTestFiles: true,
            maxInstances: 4,
            //maxSessions: -1,
            //parallelCapability: true
            browserName: chrome,
            specs: ['readonly/*.spec.js']
        },
        {
            shardTestFiles: false,
            maxInstances: 1,
            //maxSessions: 1,
            //sequential: true
            //parallelCapability: false
            browserName: chrome,
            specs: ['readwrite/*.spec.js']
        }
    ],

It can be worked around by having two protractor.conf.js files and running them separately and sequentially, but it's not ideal.

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