Unable to generate Code Coverage report - 'Cannot find coverage file'
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- babel, node.js, typescript, webpack
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi với Cypress 13.6.1, @cypress/code-coverage 3.12.15 và phiên bản Node đã nêu, sau đó kiểm tra cypress.config.ts, cypress/plugins/index.js và cypress/support/e2e.ts. Theo dõi task code coverage và thiết lập support để xác định tại sao cypress/coverage/temp/out.json không được tạo; hoàn thành nghĩa là các báo cáo coverage được tạo thay vì bị bỏ qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I recently upgraded the Cypress version to 13.6.1 from 9.6.x and the coverage reports stopped working. Followed all the steps mentioned in this guide https://docs.cypress.io/guides/tooling/code-coverage#E2E-code-coverage
Debug Log
code-coverage combined NYC options { 'report-dir': './cypress/coverage/ui', reporter: [ 'lcov', 'clover', 'json', 'json-summary' ], extension: [ '.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx' ], excludeAfterRemap: false, 'temp-dir': './cypress/coverage/temp' } +0ms
Coverage failure message
Cannot find coverage file /ui-workspace/cypress/coverage/temp/out.json
Skipping coverage report
Versions
- What is this plugin's version? If this is NOT the latest released version, can you try the latest version, please?
"@cypress/code-coverage": "3.12.15",
"cypress": "13.6.1"
- If the plugin worked before in version X but stopped after upgrading to version Y, please try the released versions between X and Y to see where the breaking change was.
- What is the Cypress version? -
13.6.1 - What is your operating system? -
Mac OS Ventura - What is the shell? -
OMZ - What is the Node version? -
v16.18.1 - What is the NPM version? -
8.19.2 - How do you instrument your application? Cypress does not instrument web application code, so you must do it yourself. -
Via babel using webpack - When running tests, if you open the web application in a regular browser and open DevTools, do you see
window.__coverage__object? Can you paste a screenshot? - Is there a
.nyc_outputfolder? Is there a.nyc_output/out.jsonfile? Is it empty? Can you paste at least part of it so we can see the keys and file paths? -it is empty - Do you have any custom NYC settings in
package.json(nycobject) or in other NYC config files? -No - Do you run Cypress tests in a Docker container? -
The issue is happening in both Mac OS and Linux based Docker Containers.
Here is some additional information
cypress.config.ts file
....
e2e: {
setupNodeEvents(on, config) {
require('./cypress/plugins/index.js')(on, config);
return config;
},
}]
...
cypress/plugins/index.js file
const cypressTypeScriptPreprocessor = require('./cy-ts-preprocessor');
module.exports = (on, config) => {
if (config && config.env && config.env.recordCodeCoverage) {
on('file:preprocessor', cypressTypeScriptPreprocessor);
// enable code coverage collection
require('@cypress/code-coverage/task')(on, config);
}
// IMPORTANT to return the config object
// with the any changed environment variables
return config;
};
cypress/support/e2e.ts file
import '@cypress/code-coverage/support';
Any help is appreciated.
Thanks,
Nathan
- Ngôn ngữ chính
- TypeScript
- Star
- 440
- Fork
- 114
- Merge trung bình
- 42 phút
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cypress-io/code-coverage
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 40/100
cypress-io/code-coverage#1018 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
cypress-io/code-coverage#993 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
cypress-io/code-coverage#967 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
cypress-io/code-coverage#959 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
performance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
cypress-io/code-coverage#933 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cypress-io/code-coverage
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Yeraze/meshmonitor#6239 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
better-auth/better-auth#12292 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The sample email preview's ResizeObserver is never disconnected and keeps raising errors after leaving SettingsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ui bug effort:S priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Typo in WSL project description on Projects pageCó thể đã có người làm @akhil9tiet đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
microsoft/opensource.microsoft.com#1066 · 1 bình luận ·