codeceptjs / codeceptjs/CodeceptJS

Run-workers. Need to filter tests in main thread when using grep

Open
#2,548 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.2k
Forks
757
Avg merge
2d 9h
Merged PRs (30d)
16

Description

#### What are you have?
When we use run-workers main thread divides tests by the number of workers.
If we use grep with run-workers filter is applied on the next step inside workers. So we can have uneven distribution of tests among workers.
For example:
- tests: test1,test2,test3,test4,test5,test6,test7,test8,test9
- we will call command run-workers 3 with grep test7,test8,test9
- Main thread will divide tests
- worker1: test1,test2,test3
- worker2: test4,test5,test6
- worker3: test7,test8,test9
- Than filter will be applied inside workers and we will see
- worker1: -
- worker2: -
- worker3: test7,test8,test9

#### What do you trying to achieve?
Filter tests in the main thread before dividing tests between workers

### Details

* CodeceptJS version: 2.6.5
* NodeJS Version: 12
* puppeteer || webdriverio || protractor || testcafe version (if related)
* Configuration file:

```js
tests: './tests/**/*_test.js',
output: './output',
helpers: {
WebDriver: {
url: 'http://localhost',
browser: 'chrome',
smartWait: 10000,
waitForTimeout: 10000,
restart: true,
windowSize: 'maximize',
desiredCapabilities: {
chromeOptions: {
prefs: {
'plugins.always_open_pdf_externally': true,
'profile.default_content_settings.popups': 0,
'profile.default_content_setting_values.automatic_downloads': 1,
'download.prompt_for_download': false,
'download.default_directory': path.join(process.cwd(), 'output', 'downloads'),
},
},
},
},
ChaiWrapper: {
require: 'codeceptjs-chai',
},
FileSystem: {},
},
include,
bootstrap: null,
name: 'simple',
plugins: {
wdio: {
enabled: true,
services: ['selenium-standalone'],
},
screenshotOnFail: {
enabled: true,
fullPageScreenshots: true,
},
allure: {},
},
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.