Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow parallel envs with cucumber #4095

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/runner/cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ class CliRunner {
}

isTestWorkersEnabled() {
if (this.testRunner.supportsTestWorkers === false) {
return false;
}

const testWorkers = this.test_settings.testWorkersEnabled && !singleSourceFile(this.argv);
if (!testWorkers) {

Expand Down
4 changes: 4 additions & 0 deletions lib/runner/test-runners/cucumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ class CucumberSuite extends TestSuite {

class CucumberRunnner extends Runner {
get supportsConcurrency() {
return true;
}

get supportsTestWorkers() {
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('Cucumber integration - parallel running single formatter', function()
});
});

it('testCucumberSampleTests in parallel with multiple step definition files', function() {
it.only('testCucumberSampleTests in parallel with multiple step definition files', function() {
garg3133 marked this conversation as resolved.
Show resolved Hide resolved

commandMocks.elementText('5cc459b8-36a8-3042-8b4a-258883ea642b', 'xx');

Expand All @@ -56,6 +56,7 @@ describe('Cucumber integration - parallel running single formatter', function()
parallel: true,
verbose: true,
timeout: 10,
env: 'chrome,firefox',
silent: false,
tags: ['not @fail'],
format: 'progress',
Expand Down
15 changes: 14 additions & 1 deletion test/extra/cucumber-config-parallel.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ module.exports = {
feature_path: path.join(__dirname, '../cucumber-integration-tests/sample_cucumber_tests/parallel/sample.feature')
}
},

test_settings: {
chrome: {
desiredCapabilities: {
browserName: 'chrome'
}
},
firefox: {
desiredCapabilities: {
browserName: 'firefox'
}
}
},
output: false,
silent: false
}
};
Loading