codeceptjs / codeceptjs/CodeceptJS

Running tests with workers causing incorrect failure / passing count

Đang mở
#2,158 11 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

#### What are you trying to achieve?
To run a series of test features expect 0 or positive failures, or 100% success across all 78 tests.

#### What do you get instead?
In the output below, one test failed but the output says all test have passed (although there are 78 total, the count says 77.)
```
[5] ✔ [testname]
[2] ✔ [testname]
[8] ✖ [testname] 264128ms
[8] [featurename] --
[8] ✔ [testname]
[5] ✔ [testname]
[2] ✔ [testname]
[2] ✔ [testname]
[5] ✔ [testname]
[5] ✔ [testname]
[2] ✔ [testname]
[5] ✔ [testname]
[2] ✔ [testname]
[5] ✔ [testname]
[5] ✔ [testname]
[5] ✔ [testname]
[5] ✔ [testname]
[5] ✔ [testname]
[5] ✔ [testname]

OK | 77 passed // 1106.326s
/tmp/build/3e139e9d
+ '[' 0 -ne 0 ']'
```

In other instances, with no pipeline changes, it would say all tests passed with -1 failed.
```
FAIL | 78 passed, -1 failed // 1144.407s
```

Codecept is being run with:
```
codeceptjs run-workers --suites 8 --grep @full-suite
```

These asynchronous tests were passing OK for some time. They are all being ran within a codecept container.

### Details

* CodeceptJS version: v2.4.1
* NodeJS Version: v12.10.0
* Operating System: Not sure
* puppeteer || webdriverio || protractor || testcafe version (if related) Not sure
* Configuration file:

```js
exports.config = {
tests: './tests/*.js',
timeout: 10000,
output: './output',
helpers: {
Puppeteer: {
chrome: { args: ['--no-sandbox'] },
url: 'http://localhost:8000',
show: false,
restart: false,
keepBrowserState: true,
windowSize: '1200x800',
waitForNavigation: 'networkidle0',
waitForTimeout: 30000,
},
DomHelpers: { require: './helpers/DomHelpers.js' },
},
include: {
I: './steps/steps_file.js',
[more stuff]
},
plugins: {
retryFailedStep: {
enabled: true,
retries: 5,
minTimeout: 500,
},
[customplugin]
},
bootstrap: false,
// bail will fail hard after one test failure
mocha: { bail: false },
name: '[name]',
};
```

Hopefully the info I've provided is sufficient -- please let me know if I can provide anything else!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với entry point run-workers và lệnh được báo cáo, `codeceptjs run-workers --suites 8 --grep @full-suite`; sử dụng cấu hình được cung cấp và kịch bản 78 test để tái hiện các tổng số không nhất quán. Theo dõi cách kết quả của các worker được kết hợp và xác minh rằng các số đếm passed/failed cuối cùng cùng trạng thái thoát của tiến trình khớp với từng kết quả riêng lẻ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, nodejs
Lĩnh vực
testing-qa
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.