Do not generate a coverage report when visiting local HTML files with `expectBackendCoverageOnly` enabled
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cypress, typescript
- 領域
- testing
調査の方向性
cypress/plugins/index.js から始め、baseUrl が null に設定され、expectBackendCoverageOnly が有効な場合に、コードカバレッジ設定が cy.visit をどのように処理するかを追跡します。Issue にある 2 つの visit を再現し、ローカルの cypress/downloads/test.html のケースと外部 URL を比較します。ローカル HTML への visit で no-coverage-information エラーが発生しなくなり、バックエンドのカバレッジが引き続き機能すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem:
When visiting a local HTML file (cypress/downloads/test.html), the coverage report is not generated. However, when visiting an external URL like https://docs.cypress.io/app/tooling/code-coverage, the coverage report is successfully generated.
and the error message is code-coverage/test-apps/backend/.nyc_output/out.json has no coverage information
Did you forget to instrument your web application?
Cypress Configuration:
const { defineConfig } = require('cypress')
module.exports = defineConfig({
fixturesFolder: false,
env: {
codeCoverage: {
url: 'http://localhost:3003/__coverage__',
expectBackendCoverageOnly: true
},
},
e2e: {
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:3003',
},
})
Test Spec:
/// <reference types="Cypress" />
context('Converage Test', () => {
it('backend test', function() {
cy.visit('/')
cy.request('/hello')
})
it('visit local html file', {baseUrl: null}, () => {
cy.visit('cypress/downloads/test.html') // failed to generate coverage report
// cy.visit('https://docs.cypress.io/app/tooling/code-coverage') //Successfully generated the coverage report.
})
})
- 主要言語
- TypeScript
- スター
- 440
- フォーク
- 114
- 平均マージ
- 42分
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cypress-io/code-coverage のほかの issue
-
難易度 3/5 半日 初心者へのやさしさ 40/100
cypress-io/code-coverage#1018 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
cypress-io/code-coverage#993 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
cypress-io/code-coverage#967 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
cypress-io/code-coverage#959 ·
メンテナーはふだん 1 日以内に返信
-
performance
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
cypress-io/code-coverage#933 ·
メンテナーはふだん 1 日以内に返信
cypress-io/code-coverage の issue をすべて見る
似ている issue
-
Chip source filter and denial markers miss Storage rows when a Storage activity source is pickedオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
omdsh-dev/DSH-better-sidebar#1141 ·
メンテナーはふだん 2 日以内に返信
-
desktop linux photos
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Cleanup Setup対応中かも @AlexanderKaran が今日担当しました。 オープンdocumentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
e18e/framework-tracker#769 ·
メンテナーはふだん 1 日以内に返信
-
bug v2
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
modelcontextprotocol/servers#5483 ·
メンテナーはふだん 1 日以内に返信