Skip to content

eljonny/DotNetTestGenerator

Repository files navigation

DotNetTestGenerator

Generates unit test skeletons, also with minimal automated test generation (with plans for extensive test generation) for .NET code (C# or VB.Net) based on existing projects with assemblies to be tested.

This is not for Test Driven Development, but for generating tests for .NET code that needs to be tested that exists and is compiled into a CLR assembly and has an accessible Visual Studio project.

Usage

Command line arguments are required to use the tool. The following arguments are available:

  • --project or -P: The path to the Visual Studio project file (.csproj or .vbproj) that contains the code to be tested. This is the only required argument.
  • --build-platform or -T: The build platform to use (e.g., x86, x64, AnyCPU). Defaults to null, which will then find and use the newest assembly corresponding to the project build output in the bin/ directory.
  • --build-configuration or -C: The build configuration to use (e.g., Debug, Release). Defaults to null, which will then find and use the newest assembly corresponding to project output in the bin/ directory.
  • --output or -O (that is an upper-case O): The output directory where the generated test files will be saved. If not provided, the GUI will ask you to select an output location before the tests can be generated.
  • --set-output-directory-automatically-on-start or -A: If this argument is provided, the output directory will be set automatically to the project directory where the project file is located. This is useful for quickly generating tests without having to select an output directory every time.
  • --generation-language or -L: The programming language to use for the generated tests. Options are CSharp or VB.Net. Defaults to null, which will then prompt the user to select a generation language prior to generating the tests.

Configuration

The tool can be configured using the XML configuration file in Configuration/UnitTestGen/general.xml.

About

Generate MSTest test skeletons in C# and VB.Net

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published