TestIt.ApiClient 1.2.1

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

// Install TestIt.ApiClient as a Cake Tool
#tool nuget:?package=TestIt.ApiClient&version=1.2.1                

Test IT TMS API client for .NET

Test IT

Getting Started

Prerequisites

This library uses .NET Standard 2.0. For list of supported runtimes check out official .NET Standard documentation.

Supported platforms depend on .NET runtime.

Installation

NuGet CLI

Install-Package TestIt.ApiClient

.NET CLI

dotnet package add TestIt.ApiClient

Compatibility

Test IT API Client
3.3 1.0
3.4 1.1
3.5 1.2

Usage

Configuration

To use client you need to provide configuration to TestItApiClient. There 4 ways to do it (sorted by priority ascending):

  1. TestItApiConfig object
var config = new TestItApiConfig
{
    ServerAddress = "example.com",
    PrivateToken = "ExampleToken"
};

var client = new TestItApiClient(config);
  1. JSON-file
{
    "serverAddress": "example.com",
    "privateToken": "ExampleToken"
}
var client = new TestItApiClient("/path/to/file.json");
  1. Path to JSON-file from TESTIT_CONFIG_FILE environment variable

  2. Server address and private token from TESTIT_SERVER_ADDRESS and TESTIT_PRIVATE_TOKEN environment variables respectively

  3. Path to JSON-file from CLI arguments

./yourapp --testit-config-file "path/to/file.json"
  1. Server address and private token from CLI arguments
./yourapp --testit-server-address "example.com" --testit-private-token "ExampleToken"

After configuration is done you can access different clients from TestItApiClient object and then use methods to control Test IT.

Examples

Get project list

var client = new TestItApiClient();
var projects = await client.Projects.GetAllProjectsAsync();

Create test-case

var client = new TestItApiClient();

var project = (await client.Projects.GetAllProjectsAsync()).First();
var rootSection = (await client.Projects.GetSectionsByProjectIdAsync(project.Id.ToString())).First();

var workItemModel = new WorkItemPostModel
{
    EntityTypeName = WorkItemEntityTypes.TestCases,
    State = WorkItemStates.Ready,
    Priority = WorkItemPriorityModel.Medium,
    Name = "Example test-case",
    ProjectId = project.Id!.Value,
    SectionId = rootSection.Id!.Value
};

var createdWorkItem = await client.WorkItems.CreateWorkItemAsync(workItemModel);

Contributing

Most of the code in this repository was automatically generated with NSwag. Nevertheless 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 directly create a pull request after you edit the README.md file with necessary changes.
  • Please make sure you check your spelling and grammar.
  • Create individual PR for each suggestion.
  • Please also read through 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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TestIt.ApiClient:

Package Downloads
TestIT.Adapter.Core

Test IT Core adapter

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.1.0 206 11/27/2024
3.0.0 3,233 5/20/2024
2.6.0 3,046 3/4/2024
2.5.0 3,862 11/27/2023
2.4.0 722 9/13/2023
2.2.0 16,483 4/27/2023
2.1.0 3,166 2/27/2023
2.0.0 1,032 9/16/2022
1.2.1 809 5/19/2022
1.1.0 753 12/21/2021
1.0.2 744 11/1/2021