codeceptjs / codeceptjs/CodeceptJS
Run-workers. Need to filter tests in main thread when using grep
- 主要語言
- JavaScript
- 星號
- 4.2k
- 分支
- 757
- 平均合併
- 2 天 9 小時
- 30 天內合併 PR
- 16
描述
#### 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: {},
},
```
貢獻指南
研究方向
從 run-workers 命令開始,追蹤主執行緒如何發現並劃分測試,然後確認 grep 在 workers 內部的套用位置。當 grep 篩選在分配之前進行,且選取的測試在 workers 之間平均分配時,修改即完成;如果找到相關的測試進入點,請為回報的 test7,test8,test9 情境新增或執行覆蓋率。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, nodejs
- 領域
- cli, testing-qa
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100