Skip to content

add parallel multiremote capability#10803

Merged
christian-bromann merged 5 commits intowebdriverio:mainfrom
ccharnkij:parallel-multiremote
Aug 15, 2023
Merged

add parallel multiremote capability#10803
christian-bromann merged 5 commits intowebdriverio:mainfrom
ccharnkij:parallel-multiremote

Conversation

@ccharnkij
Copy link
Contributor

Proposed changes

Continuation of 5458 and 5445, this feature allows running Multiremote in parallel by passing an array of multiremote capabilities.

capabilities: [
        {
            browser1: { capabilities: { browserName: 'chrome' } },
            browser2: { capabilities: { browserName: 'chrome' } }
        },
        {
            browser1: { capabilities: { browserName: 'firefox' } },
            browser2: { capabilities: { browserName: 'firefox' } }
        },
        {
            browser1: { capabilities: { browserName: 'chrome' } },
            browser2: { capabilities: { browserName: 'firefox' } }
        }
    ],

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

I try to do this by not adding any new configuration, but instead adding logic to determine if the objects inside capabilities array are of multiremote type by checking for the 'capabilities' field. To use it, a user just have to put multiremote object in an array.

capabilities: [
        {
            browser1: { capabilities: { browserName: 'chrome' } },
            browser2: { capabilities: { browserName: 'chrome' } }
        },
        {
            browser1: { capabilities: { browserName: 'firefox' } },
            browser2: { capabilities: { browserName: 'firefox' } }
        },
    ],

I have run some test locally using devtools and selenium service and it went well.

I also try to make changes to other services that require it. However, I can only test non-cloud services locally. If there is any other place that I miss applying the changes, please let me know.

Reviewers: @webdriverio/project-committers

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 25, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@christian-bromann
Copy link
Member

Wow .. this is awesome! Thank you so much for the work. I will have to carefully review and test this to ensure we everything works. In the meantime, could you add a smoke test that verifies that mutliremote works from e2e?

@ccharnkij ccharnkij force-pushed the parallel-multiremote branch from 09618d3 to 82b3abd Compare July 26, 2023 21:03
@ccharnkij
Copy link
Contributor Author

I have added smoke and e2e tests. Let me know how it goes.

@christian-bromann
Copy link
Member

@ccharnkij can we mention this in the docs that users can run multiremote in parallel? I'ld suggest to update this section: https://webdriver.io/docs/multiremote#using-wdio-testrunner

@ccharnkij ccharnkij force-pushed the parallel-multiremote branch from 08dc768 to 6981b2d Compare August 12, 2023 01:28
@ccharnkij
Copy link
Contributor Author

I added the doc, modified e2e test a little, rebased from main, and squashed commits. Please review again when you get a chance.

@christian-bromann
Copy link
Member

@ccharnkij thanks, mind reducing the coverage treshold as it is causing Linux builds to fail

@ccharnkij ccharnkij force-pushed the parallel-multiremote branch from 6981b2d to 13969b9 Compare August 12, 2023 05:09
@ccharnkij
Copy link
Contributor Author

better? I rebased it again.

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent work, kudos 👏

LGTM 👍

@christian-bromann christian-bromann added the PR: New Feature 🚀 PRs that contain new features label Aug 14, 2023
@christian-bromann
Copy link
Member

I am investigating the failing windows build and will merge once I found a resolution.

@ccharnkij
Copy link
Contributor Author

Thanks.

@christian-bromann christian-bromann merged commit 2a3178c into webdriverio:main Aug 15, 2023
@ccharnkij ccharnkij deleted the parallel-multiremote branch August 16, 2023 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: New Feature 🚀 PRs that contain new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants