NosimusAI.TestSuite 1.0.10

dotnet add package NosimusAI.TestSuite --version 1.0.10
                    
NuGet\Install-Package NosimusAI.TestSuite -Version 1.0.10
                    
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="NosimusAI.TestSuite" Version="1.0.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NosimusAI.TestSuite" Version="1.0.10" />
                    
Directory.Packages.props
<PackageReference Include="NosimusAI.TestSuite" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NosimusAI.TestSuite --version 1.0.10
                    
#r "nuget: NosimusAI.TestSuite, 1.0.10"
                    
#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.
#:package NosimusAI.TestSuite@1.0.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NosimusAI.TestSuite&version=1.0.10
                    
Install as a Cake Addin
#tool nuget:?package=NosimusAI.TestSuite&version=1.0.10
                    
Install as a Cake Tool

NOSIMUS AI FOR .NET

This package allows users to

  • test their code against business requirements using AI
  • generate Gherkin test cases using AI
  • generate Gherkin test cases for AspNet controllers

Under the hood it uses call graph from entry point as a context

How to setup

  1. Install Nosimus AI package and CSharp code analysis packages
dotnet add package NosimusAI.TestSuite
dotnet add package Microsoft.CodeAnalysis.CSharp
dotnet add package Microsoft.CodeAnalysis.CSharp.Workspaces
  1. Add the following section to your configuration (either in appsettings.json or code config)
{
  "Nosimus": {
    "OpenAiKey": "",
    "SolutionPath": "Full path to .sln file",
    "OpenAiModel": "gpt-4o"
  }
}
  1. Register Nosimus AI services
serviceCollection.AddNosimusAI(configuration);
How to write a test
using NosimusAI;

[Test]
public async Task ShouldPassBusinessRequirement()
{
    var service = GlobalTestSetup.ServiceProvider!.GetRequiredService<TestRunner>();
    var result = await service.RunTest(
        @"Must borrow the book. 
          Must ensure that book was not borrowed more than 30 days ago.
          Must ensure that abonent did not borrow more than 3 books.",
        typeof(Book), // Class (entry point)
        "Borrow", // Method (entry point)
        CancellationToken.None);
    Assert.That(result.Passed, Is.EqualTo(true));
}
How to generate Gherkin test case
var generator = serviceProvider.GetRequiredService<BusinessRequirementExtractor>();
var tests = await generator.GenerateGherkin(typeof(Book), "Borrow", CancellationToken.None);
How to generate Gherkin test cases for AspNet controllers
var generator = serviceProvider.GetRequiredService<BusinessRequirementExtractor>();
var assembly = Assembly.Load(...);
var tests = await generator.GenerateGherkinForAspNetControllers(assembly, CancellationToken.None);
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 was computed.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
1.0.10 195 2/25/2025
1.0.9 165 2/24/2025
1.0.7 150 2/23/2025
1.0.6 164 2/22/2025
1.0.5 155 2/22/2025
1.0.4 157 2/22/2025
1.0.3 167 2/21/2025
1.0.2 164 2/21/2025
1.0.1 155 2/21/2025
1.0.0 159 2/21/2025