AArnott/Xunit.Combinatorial
关于
Adds combinatorial and pairwise testing capability to Xunit tests
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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.
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
探索相关项目
加载中…