nyc_output folder not generated during automated build

オープン
#522 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cypress, nodejs, react

調査の方向性

README の Debugging セクションから始め、DEBUG=code-coverage npx cypress run コマンドをローカルと自動ビルド環境で再現します。.nyc_output/out.json と window.__coverage__ を比較し、その後 @cypress/instrument-cra のセットアップと npm run build のパスを調査します。完了条件は、欠落しているカバレッジ出力またはインストルメンテーションの原因が特定され、自動ビルドの想定される動作が検証されていることです。

索引モデルが issue の本文から書いたものです。

説明

Logs and screenshots
Please provide debug logs by running Cypress from the terminal with DEBUG=code-coverage environment variable set, see the Debugging section of the README file.

Versions

  • What is this plugin's version? If this is NOT the latest released version can you try the latest version, please? "^3.9.11
  • 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 Cypress version? ^6.0.0
  • What is your operating system? Microsoft OS
  • What is the shell? CMD
  • What is the Node version? 16.3.0
  • What is the NPM version? 7.15.1
  • How do you instrument your application? Cypress does not instrument web application code, so you need to do it yourself.
  • When running tests, if you open the web application in regular browser, and open DevTools, do you see window.__coverage__ object? Can you paste a screenshot? Yes
  • Is there .nyc_output folder? Is there .nyc_output/out.json file. Is it empty? Can you paste at least part of it so we can see the keys and file paths? Yes
  • Do you have any custom NYC settings in package.json (nyc object) or in other NYC config files: No
  • Do you run Cypress tests in a Docker container?: No

Describe the bug
I'm running Cypress with the command
DEBUG=code-coverage npx cypress run
Cypress is able to generate .nyc_output locally, but not in automated build (Codebuild). Should the .nyc_output always be generated by Cypress on every cypress run?

image

I've recently discovered that my app built out to a server is NOT showing code coverage instrumentation in window.__coverage. Does this CRA instrumentation package work only for local environments? How do I instrument the app with npm run build?

主要言語
TypeScript
スター
440
フォーク
114
平均マージ
42分
マージ済み PR(30日)
19

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cypress-io/code-coverage のほかの issue

cypress-io/code-coverage の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。