Skip to content
プロジェクト

AArnott/Xunit.Combinatorial

GitHubで見る

概要

Adds combinatorial and pairwise testing capability to Xunit tests

開発ツール

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Xunit.Combinatorial

This project allows for parameterizing your Xunit test methods such that they run multiple times, once for each combination of possible arguments for your test method. You can also limit the number of test cases by using a pairwise strategy, which generally provides good coverage for testing but significantly reduces the test case explosion you might have when you have more than two parameters.

NuGet package 🏭 Build

Installation

This project is available as a NuGet package.

The v1.x versions of this package support xunit 2. The v2.x versions of this package support xunit 3.

Example

Suppose you have this test method:

[Fact]
public void CheckFileSystem(bool recursive)
{
    // verifications here
}

To arrange for your test method to be invoked twice, once for each value of its bool parameter, change the attributes to:

[Theory, CombinatorialData]
public void CheckFileSystem(bool recursive)
{
    // verifications here
}

The CombinatorialDataAttribute will supply Xunit with both true and false arguments to run the test method with, resulting in two invocations of your test method with individual results reported for each invocation.

Learn much more on our docs site.

Sponsorships

GitHub Sponsors Zcash

関連プロジェクトを探す

読み込み中…