gdUnit4.test.adapter
1.0.0
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
<PackageReference Include="gdUnit4.test.adapter" Version="1.0.0" />
paket add gdUnit4.test.adapter --version 1.0.0
#r "nuget: gdUnit4.test.adapter, 1.0.0"
// 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
Add the
gdunit4.api
project reference to your test project:dotnet add package gdunti.api
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 | Versions 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. |
-
net7.0
- coverlet.collector (>= 6.0.0)
- gdUnit4.api (>= 4.2.1)
- Godot.SourceGenerators (>= 4.2.1)
- GodotSharp (>= 4.2.1)
- Microsoft.NET.Test.Sdk (>= 17.9.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
GdUnit4 Test Adapter beta.