Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

FUZZ_TEST_F Should Respect GTEST_SKIP() in GoogleTest Base Fixture

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
testing-qa

調査の方向性

まず、ベースフィクスチャで FUZZ_TEST_F、PerFuzzTestFixtureAdapter、GTEST_SKIP() を使用する最小限の例を再現します。ファズテスト中にフィクスチャのスキップがどのように処理されるかを追跡し、TEST_F と比較します。完了の条件は、ファズテストが失敗ログや誤解を招くステータス出力なしでスキップされ、両方の例に対するリグレッションカバレッジがあることです。

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

説明

GoogleTest allows calling GTEST_SKIP() in the SetUp() method of a fixture to skip all tests that use that fixture: https://google.github.io/googletest/advanced.html#skipping-test-execution.

FUZZ_TEST_F on the other hand continues to run the test. The test output is also confusing in this scenario. The logs and command line output indicate the test failed, but the status of each test appears to be skipped.

Minimal Example:

#include "testing/base/public/gunit.h"
#include "testing/fuzzing/fuzztest.h"
#include "third_party/googlefuzztest/googletest_fixture_adapter.h"

namespace {

class SkipFixture : public testing::Test {
 protected:
  void SetUp() override { GTEST_SKIP(); }
};

class FuzzTestFixture
    : public ::fuzztest::PerFuzzTestFixtureAdapter<SkipFixture> {
 public:
  void FailingTest() { FAIL(); /*Not Skipped*/ }

  void FailingTestIsSkipped() {
    GTEST_SKIP();
    FAIL(); /*Skipped*/
  }
};

TEST_F(SkipFixture, FailingTestIsSkipped) { FAIL(); /*Skipped*/ }

FUZZ_TEST_F(FuzzTestFixture, FailingTest);  // Test Fails!
FUZZ_TEST_F(FuzzTestFixture, FailingTestIsSkipped);

}  // namespace
主要言語
C++
スター
1.1k
フォーク
139
平均マージ
2日 21時間
マージ済み PR(30日)
19

環境構築

はじめの一歩

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

google/fuzztest のほかの issue

google/fuzztest の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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