gdUnit4.test.adapter 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package gdUnit4.test.adapter --version 1.0.0                
NuGet\Install-Package gdUnit4.test.adapter -Version 1.0.0                
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="gdUnit4.test.adapter" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add gdUnit4.test.adapter --version 1.0.0                
#r "nuget: gdUnit4.test.adapter, 1.0.0"                
#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 gdUnit4.test.adapter as a Cake Addin
#addin nuget:?package=gdUnit4.test.adapter&version=1.0.0

// Install gdUnit4.test.adapter as a Cake Tool
#tool nuget:?package=gdUnit4.test.adapter&version=1.0.0                

GdUnit4 Test Adapter

This is the GdUnit4 Test Adapter, designed to facilitate the integration of GdUnit4 with test frameworks supporting the Visual Studio Test Platform.

Getting Started

Preconditions

  • Install the C# Dev Kit. Detailed instructions can be found here.
  • Setup your test settings:
    • It is important to use the correct C# Dev Kit version, which is currently a PreRelease. The property is newly introduced by this issue.
    • Open your .vscode/settings.json and add the following property to set up your custom test run settings:
      "dotnet.unitTests.runSettingsPath": "./test/.runsettings"
      

Install the gdunit NuGet Packages

  1. Add the gdunit4.api project reference to your test project:

    dotnet add package gdunti.api
    
  2. Add the gdunit4.test.adapter project reference to your test project:

    dotnet add package gdunit4.test.adapter
    

Manually Add the gdunit NuGet Packages

Configure your test project to use GdUnit4 by adding the following to your .csproj file:

<Project Sdk="Godot.NET.Sdk">

    

    <ItemGroup>
        <PackageReference Include="gdUnit4.api" Version="<version>" />
        <ProjectReference Include="gdUnit4.test.adapter" Version="<version>"/>
    </ItemGroup>

</Project>

.runsettings Configuration

To configure GdUnit4 test execution, you can use a .runsettings file. Below is an example .runsettings file:

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
    <RunConfiguration>
        <MaxCpuCount>1</MaxCpuCount>
        <ResultsDirectory>./TestResults</ResultsDirectory>
        <TargetFrameworkVersion>net7.0</TargetFrameworkVersion>
        <TestSessionTimeout>180000</TestSessionTimeout>
        <TreatNoTestsAsError>true</TreatNoTestsAsError>
    </RunConfiguration>

    <LoggerRunSettings>
        <Loggers>
            <Logger friendlyName="console" enabled="True">
                <Configuration>
                    <Verbosity>detailed</Verbosity>
                </Configuration>
            </Logger>
            <Logger friendlyName="html" enabled="True">
                <Configuration>
                    <LogFileName>test-result.html</LogFileName>
                </Configuration>
            </Logger>
            <Logger friendlyName="trx" enabled="True">
                <Configuration>
                    <LogFileName>test-result.trx</LogFileName>
                </Configuration>
            </Logger>
        </Loggers>
    </LoggerRunSettings>

    <GdUnit4>
        
        <Parameters></Parameters>
        
        <DisplayName>FullyQualifiedName</DisplayName>
    </GdUnit4>
</RunSettings>

Ensure to customize the values inside the <Parameters> element based on your specific requirements. This configuration is crucial for successful test execution, especially in headless environments.

Run Tests from Terminal

dotnet test exampleProject.csproj --settings .runsettings

Contributing

If you encounter issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
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
2.1.0-rc2 340 10/29/2024
2.1.0-rc1 167 10/28/2024
2.0.0 7,011 7/9/2024
1.1.2 4,085 6/24/2024
1.1.1 3,258 4/17/2024
1.1.0 173 4/12/2024
1.0.0 862 2/24/2024
1.0.0-rc.202402192051 96 2/19/2024

GdUnit4 Test Adapter beta.