Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 2 additions & 2 deletions docs/parallel.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const testGroups = workers.createGroupsOfSuites(2);
const browsers = ['firefox', 'chrome'];

const configs = browsers.map(browser => {
return helpers: {
return helpers: {
WebDriver: { browser }
}
});
Expand Down Expand Up @@ -127,7 +127,7 @@ If you want your tests to split according to your need this method is suited for
```js

/*
Define a function to split your tests, Here its hardcoded, But you write a logic to split your tests
Define a function to split your tests.

function should return an array with this format [[file1, file2], [file3], ...]

Expand Down
6 changes: 2 additions & 4 deletions lib/workers.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,10 @@ class Workers extends EventEmitter {
* @param {Number} numberOfWorkers
*/
createGroupsOfSuites(numberOfWorkers) {
const files = this.codecept.testFiles;
const mocha = Container.mocha();
mocha.files = files;
mocha.loadFiles();
const groups = populateGroups(numberOfWorkers);

const mocha = Container.mocha();

mocha.suite.suites.forEach((suite) => {
const i = indexOfSmallestElement(groups);
suite.tests.forEach((test) => {
Expand Down