collectBackendCoverage fails in afterAll step when the window's origin and baseUrl are both blank
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cypress, nextjs, typescript
- 領域
- testing
調査の方向性
stack trace で 151 行目付近に特定された collectBackendCoverage 周辺の support.js を調査し、window の origin と baseUrl の両方が空の状態で、cy.visit より前に afterAll に到達する失敗テストを再現してください。backend coverage を収集していない場合に無効な cy.request() を試行せず、frontend coverage が引き続き完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I am running a cypress project that does not set "baseUrl" in our config file for various reasons. I am trying to add the code-coverage plugin, but only for front end metrics with our instrumented NextJs app.
Everything works except when we encounter the following scenario. When running a test that fails before it has executed cy.visit, so it has a blank window origin, and of course baseUrl is not set, then during the "afterAll" step the code coverage plugin fails with the following message. about collectBackendCoverage. Again we are not attempting to collect backend coverage so this is some default behavior of the plugin that should not be default behavior.
`cy.request()` must be provided a fully qualified `url` - one that begins with `http`. By default `cy.request()` will use either the current window's origin or the `baseUrl` in `cypress.config.ts`. Neither of those values were present.
https://on.cypress.io/request
Because this error occurred during a `after all` hook we are skipping all of the remaining tests.
Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
CypressError: `cy.request()` must be provided a fully qualified `url` - one that begins with `http`. By default `cy.request()` will use either the current window's origin or the `baseUrl` in `cypress.config.ts`. Neither of those values were present.
https://on.cypress.io/request
at Context.request (http://localhost:3000/__cypress/runner/cypress_runner.js:132841:70)
at wrapped (http://localhost:3000/__cypress/runner/cypress_runner.js:138282:43)
From Your Spec Code:
at Context.collectBackendCoverage (webpack://myproject/./node_modules/@cypress/code-coverage/support.js:151:0)
- 主要言語
- 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
-
Navbar avatar and name stay stale after saving profile changes対応中かも @alexechoi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
marmelab/atomic-crm#416 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
epam/ai-dial-react-file-manager#99 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
canonical/craft-actions#146 ·
メンテナーはふだん 2 日以内に返信
-
feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
bluesky-social/social-app#12343 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lucide-icons/lucide#5165 ·
メンテナーはふだん 1 日以内に返信