TestFountain 4.0.8

dotnet add package TestFountain --version 4.0.8                
NuGet\Install-Package TestFountain -Version 4.0.8                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TestFountain" Version="4.0.8" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TestFountain --version 4.0.8                
#r "nuget: TestFountain, 4.0.8"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TestFountain as a Cake Addin
#addin nuget:?package=TestFountain&version=4.0.8

// Install TestFountain as a Cake Tool
#tool nuget:?package=TestFountain&version=4.0.8                

TestFountain

.NET Publish Coverage Status

TestFountain is a C# library that provides an attribute for xUnit.Net to generate random test data. It aims to simplify the process of generating diverse and comprehensive test cases by automatically creating random input values for your xUnit.Net tests.

Features

  • Random Data Generation: TestFountain allows you to easily generate random test data for your xUnit.Net tests. By using the FountainDataAttribute, you can annotate your test methods and have them automatically receive randomized input parameters.

  • Customization: You can customize the generated data by specifying the data type, range, length, and other attributes using various options provided by TestFountain.

  • Simplified Test Cases: With TestFountain, you no longer need to manually define and manage multiple test cases. It generates a wide range of test inputs automatically, allowing you to focus on writing assertions and verifying the behavior of your code.

Getting Started

Prerequisites

  • .NET 8.0 or later

Installation

You can install TestFountain via NuGet package manager or by adding a reference to your project file.

Using NuGet Package Manager
  1. Open the NuGet Package Manager Console in Visual Studio.
  2. Execute the following command:
    Install-Package TestFountain
    
Adding a Reference
  1. Right-click on your project in Visual Studio.
  2. Select "Manage NuGet Packages."
  3. Search for "TestFountain" and click on "Install."

Usage

To use TestFountain in your xUnit.Net tests, follow these steps:

  1. Annotate your test method with the RandomDataAttribute and specify the desired options:

    [Theory]
    [FountainData]
    public void MyRandomTestMethod(int randomNumber, string randomString)
    {
        // Use the random values for testing
    }
    

    In this example, randomNumber and randomString will be automatically populated with random values each time the test runs.

  2. Customize the generated data by using the available options. For example:

    [Theory]
    [FountainData(10)]
    public void MyRandomTestMethod(int randomNumber)
    {
        // Use the random integer value between 0 and 100 for testing
    }
    
  3. Run your xUnit.Net tests as usual, and TestFountain will generate random test data for your annotated test methods.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.0.8 4 1/29/2025
4.0.7 27 1/28/2025
4.0.6 51 1/15/2025
4.0.5 46 1/8/2025
4.0.4 97 12/10/2024
4.0.3 80 12/9/2024
4.0.2 93 12/6/2024
4.0.1 94 12/3/2024
4.0.0 96 11/24/2024
3.0.0 95 11/23/2024
2.0.184 95 11/14/2024
2.0.183 100 11/13/2024
2.0.182 104 11/11/2024
2.0.181 95 11/8/2024
2.0.180 95 11/5/2024
2.0.179 93 11/4/2024
2.0.178 93 10/30/2024
2.0.177 93 10/29/2024
2.0.176 93 10/29/2024
2.0.175 98 10/14/2024
2.0.174 97 10/10/2024
2.0.173 97 10/9/2024
2.0.172 97 10/8/2024
2.0.171 103 10/1/2024
2.0.170 102 9/30/2024
2.0.169 101 9/27/2024
2.0.168 99 9/24/2024
2.0.167 102 9/23/2024
2.0.166 115 9/16/2024
2.0.165 109 9/9/2024
2.0.164 108 9/2/2024
2.0.163 116 8/29/2024
2.0.162 100 8/26/2024
2.0.161 122 8/23/2024
2.0.160 134 8/22/2024
2.0.159 127 8/15/2024
2.0.158 120 8/14/2024
2.0.157 118 8/13/2024
2.0.156 107 8/5/2024
2.0.155 101 8/2/2024
2.0.154 77 8/1/2024
2.0.153 77 7/31/2024
2.0.152 95 7/25/2024
2.0.151 100 7/11/2024
2.0.150 123 7/10/2024
2.0.149 117 7/9/2024
2.0.148 125 7/2/2024
2.0.147 114 6/27/2024
2.0.146 118 6/26/2024
2.0.145 114 6/25/2024
2.0.144 121 6/21/2024
2.0.143 118 6/19/2024
2.0.142 137 6/18/2024
2.0.141 104 6/17/2024
2.0.140 111 6/14/2024
2.0.139 97 6/13/2024
2.0.138 99 6/12/2024
2.0.137 110 6/1/2024
2.0.136 106 5/30/2024
2.0.135 118 5/29/2024
2.0.134 101 5/27/2024
2.0.133 110 5/16/2024
2.0.132 109 5/15/2024
2.0.131 114 5/10/2024
2.0.130 117 5/8/2024
2.0.129 116 5/7/2024
2.0.128 143 5/6/2024
2.0.127 78 5/3/2024
2.0.126 96 5/1/2024
2.0.125 119 4/30/2024
2.0.124 116 4/29/2024
2.0.123 140 4/15/2024
2.0.122 127 4/13/2024
2.0.121 134 4/11/2024
2.0.120 121 4/10/2024
2.0.119 138 4/2/2024
2.0.118 113 3/29/2024
2.0.117 109 3/28/2024
2.0.116 127 3/18/2024
2.0.115 156 3/15/2024
2.0.114 139 3/14/2024
2.0.113 125 3/13/2024
2.0.112 131 3/12/2024
2.0.111 133 3/8/2024
2.0.110 117 3/7/2024
2.0.109 121 3/7/2024
2.0.108 120 3/5/2024
2.0.107 121 3/4/2024
2.0.106 112 3/1/2024
2.0.105 111 2/29/2024
2.0.104 117 2/29/2024
2.0.103 112 2/27/2024
2.0.102 117 2/26/2024
2.0.101 127 2/23/2024
2.0.100 104 2/23/2024
2.0.99 112 2/22/2024
2.0.98 117 2/21/2024
2.0.97 126 2/20/2024
2.0.96 114 2/19/2024
2.0.95 122 2/16/2024
2.0.94 121 2/16/2024
2.0.93 118 2/15/2024
2.0.92 154 2/13/2024
2.0.91 118 2/12/2024
2.0.90 126 2/9/2024
2.0.89 128 2/8/2024
2.0.88 111 2/7/2024
2.0.87 122 2/6/2024
2.0.86 122 2/5/2024
2.0.85 116 2/2/2024
2.0.84 120 2/1/2024
2.0.83 118 2/1/2024
2.0.82 109 1/31/2024
2.0.81 113 1/29/2024
2.0.80 117 1/24/2024
2.0.79 110 1/23/2024
2.0.78 121 1/23/2024
2.0.77 123 1/19/2024
2.0.76 131 1/17/2024
2.0.75 117 1/17/2024
2.0.74 113 1/15/2024
2.0.73 121 1/12/2024
2.0.72 124 1/11/2024
2.0.71 121 1/10/2024
2.0.70 137 1/7/2024
2.0.69 159 12/27/2023
2.0.68 105 12/27/2023
2.0.67 141 12/22/2023
2.0.66 135 12/20/2023
2.0.65 137 12/15/2023
2.0.64 148 12/14/2023
2.0.63 149 12/13/2023
2.0.62 149 12/12/2023
2.0.61 156 12/12/2023
2.0.60 179 11/23/2023
2.0.59 151 11/22/2023
2.0.58 146 11/17/2023
2.0.57 139 11/16/2023
2.0.56 143 11/16/2023
2.0.55 141 11/13/2023
2.0.54 139 11/9/2023
2.0.53 146 11/7/2023
2.0.52 141 11/6/2023
2.0.51 145 11/4/2023
2.0.50 170 11/1/2023
2.0.49 153 10/30/2023
2.0.48 154 10/27/2023
2.0.47 155 10/26/2023
2.0.46 162 10/18/2023
2.0.45 165 10/14/2023
2.0.44 181 10/12/2023
2.0.43 143 10/11/2023
2.0.42 161 10/4/2023
2.0.41 164 9/25/2023
2.0.40 161 9/20/2023
2.0.39 140 9/19/2023
2.0.38 151 9/19/2023
2.0.37 157 9/14/2023
2.0.36 164 9/13/2023
2.0.35 144 9/12/2023
2.0.34 164 9/11/2023
2.0.33 166 9/11/2023
2.0.32 168 9/8/2023
2.0.31 173 9/7/2023
2.0.30 164 9/6/2023
2.0.29 177 9/5/2023
2.0.28 179 9/5/2023
2.0.27 178 9/1/2023
2.0.26 155 8/31/2023
2.0.25 196 8/30/2023
2.0.24 161 8/29/2023
2.0.23 187 8/29/2023
2.0.22 169 8/25/2023
2.0.21 197 8/24/2023
2.0.20 173 8/23/2023
2.0.19 180 8/22/2023
2.0.18 173 8/18/2023
2.0.17 171 8/17/2023
2.0.16 184 8/9/2023
2.0.15 186 8/8/2023
2.0.14 187 8/8/2023
2.0.13 211 8/7/2023
2.0.12 192 8/4/2023
2.0.11 195 8/3/2023
2.0.10 197 8/2/2023
2.0.9 180 7/28/2023
2.0.8 206 7/26/2023
2.0.7 188 7/25/2023
2.0.6 168 7/20/2023
2.0.5 181 7/20/2023
2.0.4 184 7/14/2023
2.0.3 584 1/6/2021
2.0.2 613 9/13/2020
2.0.1 650 3/25/2020
2.0.0 647 12/23/2019
1.0.5 887 8/23/2018
1.0.4 893 8/13/2018
1.0.3 903 8/13/2018