TestIT.Adapter.XUnit
1.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package TestIT.Adapter.XUnit --version 1.0.4
NuGet\Install-Package TestIT.Adapter.XUnit -Version 1.0.4
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="TestIT.Adapter.XUnit" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TestIT.Adapter.XUnit" Version="1.0.4" />
<PackageReference Include="TestIT.Adapter.XUnit" />
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 TestIT.Adapter.XUnit --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TestIT.Adapter.XUnit, 1.0.4"
#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 TestIT.Adapter.XUnit@1.0.4
#: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=TestIT.Adapter.XUnit&version=1.0.4
#tool nuget:?package=TestIT.Adapter.XUnit&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Test IT TMS Adapter for XUnit
Getting Started
Installation
NuGet CLI
Install-Package TestIT.Adapter.XUnit
Install-Package TestIT.Adapter.Core
.NET CLI
dotnet package add TestIT.Adapter.XUnit
dotnet package add TestIT.Adapter.Core
Usage
Configuration
| Description | Property | Environment variable |
|---|---|---|
| Location of the TMS instance | url | TMS_URL |
| API secret key How to getting API secret key? | privateToken | TMS_PRIVATE_TOKEN |
| ID of project in TMS instance How to getting project ID? | projectId | TMS_PROJECT_ID |
| ID of configuration in TMS instance How to getting configuration ID? | configurationId | TMS_CONFIGURATION_ID |
| ID of the created test run in TMS instance. | testRunId | TMS_TEST_RUN_ID |
| It enables/disables certificate validation (It's optional). Default value - true | certValidation | TMS_CERT_VALIDATION |
| Mode of automatic creation test cases (It's optional). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create a test case linked to the created autotest (not to the updated autotest)<br/>false - in this mode, the adapter will not create a test case | automaticCreationTestCases | TMS_AUTOMATIC_CREATION_TEST_CASES |
| Enable debug logs (It's optional). Default value - false | isDebug | - |
File
Create Tms.config.json file in the project directory:
{
"url": "URL",
"privateToken": "USER_PRIVATE_TOKEN",
"projectId": "PROJECT_ID",
"configurationId": "CONFIGURATION_ID",
"testRunId": "TEST_RUN_ID",
"automaticCreationTestCases": false,
"certValidation": true,
"isDebug": true
}
How to run
If you specified TestRunId, then just run the command:
dotnet test
To create and complete TestRun you can use the Test IT CLI:
$ export TMS_TOKEN=<YOUR_TOKEN>
$ testit \
--mode create
--url https://tms.testit.software \
--project-id 5236eb3f-7c05-46f9-a609-dc0278896464 \
--testrun-name "New test run" \
--output tmp/output.txt
$ export TMS_TEST_RUN_ID=$(cat output.txt)
$ dotnet test
$ testit \
--mode finish
--url https://tms.testit.software \
--testrun-id $(cat tmp/output.txt)
Attributes
Use attributes to specify information about autotest.
Description of attributes:
WorkItemIds- linking an autotest to a test case.DisplayName- name of the autotest in Test IT.ExternalId- ID of the autotest within the project in Test IT.Title- title in the autotest card and the step.Description- description in the autotest card and the step.Labels- tags in the autotest card.Links- links in the autotest card.Step- the designation of the step.
Description of methods:
Adapter.AddLinks- add links to the autotest result.Adapter.AddAttachments- add attachments to the autotest result.Adapter.AddMessage- add message to the autotest result.
Examples
Simple test
using Tms.Adapter.Core.Attributes;
using Tms.Adapter.XUnit.Attributes;
using Tms.Adapter.Core.Models;
public class SampleTests : IDisposable {
[Before]
public StepsTests()
{
}
[Step]
public void CreateProject()
{
Assert.IsTrue(true);
}
[Step]
[Title("Enter project title")]
[Description("Enter project description")]
public void EnterProject()
{
Assert.IsTrue(true);
}
[Step]
public void CreateSection()
{
Assert.IsTrue(true);
Adapter.AddAttachment("/Users/user/screen.json");
}
[TmsFact]
[WorkItemIds("1523344", "54321")]
[ExternalId("all_annotations_test")]
[Title("All Annotations Test Title")]
[DisplayName("All Annotations Test Display Name")]
[Labels("tag01", "tag02")]
[Description("All Annotations Test Description")]
[Links("https://test01.example", "Example01", "Example01 description", LinkType.Issue)]
[Links("https://test02.example")]
public void AllAnnotationsTest()
{
Adapter.AddLinks("https://test01.example", "Example01", "Example01 description", LinkType.Issue);
Adapter.AddLinks("https://test02.example");
CreateProject();
EnterProject();
CreateSection();
}
[After]
public void Dispose()
{
}
}
Parameterized test
using Tms.Adapter.Core.Attributes;
using Tms.Adapter.XUnit.Attributes;
using Tms.Adapter.Core.Models;
public class ParameterizedTests {
[InlineData(1, "string1")]
[InlineData(2, "string2")]
[InlineData(3, "string3")]
[ExternalId("ParametrizedTest_Success_{number}_{str}")]
[Title("ParametrizedTest_Success Title {number} {str}")]
[DisplayName("ParametrizedTest_Success DisplayName {number} {str}")]
[TmsTheory]
public void ParametrizedTest_Success(int number, string str)
{
Assert.True(true);
}
}
Contributing
You can help to develop the project. Any contributions are greatly appreciated.
- If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or create a direct pull request after you edit the README.md file with necessary changes.
- Make sure to check your spelling and grammar.
- Create individual PR for each suggestion.
- Read the Code Of Conduct before posting your first idea as well.
License
Distributed under the Apache-2.0 License. See LICENSE for more information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- AspectInjector (>= 2.8.1)
- TestIT.Adapter.Core (>= 1.0.4)
- xunit.core (>= 2.4.1)
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.0.0 | 49 | 4/7/2026 |
| 2.0.0-TMS-5.7 | 27 | 4/7/2026 |
| 1.12.5 | 104 | 3/30/2026 |
| 1.12.4 | 90 | 3/19/2026 |
| 1.12.3 | 125 | 2/24/2026 |
| 1.12.2 | 107 | 2/20/2026 |
| 1.12.1 | 105 | 2/13/2026 |
| 1.12.0 | 120 | 2/6/2026 |
| 1.12.0-TMS-5.6 | 41 | 2/2/2026 |
| 1.12.0-rc1 | 106 | 1/27/2026 |
| 1.11.0-rc1 | 99 | 1/27/2026 |
| 1.10.7 | 348 | 12/16/2025 |
| 1.10.6 | 281 | 12/15/2025 |
| 1.10.6-TMS-5.5 | 141 | 11/26/2025 |
| 1.10.5 | 226 | 11/25/2025 |
| 1.10.5-TMS-5.5 | 158 | 11/26/2025 |
| 1.10.4 | 453 | 11/18/2025 |
| 1.10.3 | 232 | 10/30/2025 |
| 1.10.2 | 224 | 10/28/2025 |
| 1.0.4 | 236 | 7/3/2023 |
Loading failed