TestIt.ApiClient
1.0.2
See the version list below for details.
dotnet add package TestIt.ApiClient --version 1.0.2
NuGet\Install-Package TestIt.ApiClient -Version 1.0.2
<PackageReference Include="TestIt.ApiClient" Version="1.0.2" />
paket add TestIt.ApiClient --version 1.0.2
#r "nuget: TestIt.ApiClient, 1.0.2"
// Install TestIt.ApiClient as a Cake Addin #addin nuget:?package=TestIt.ApiClient&version=1.0.2 // Install TestIt.ApiClient as a Cake Tool #tool nuget:?package=TestIt.ApiClient&version=1.0.2
Test IT TMS API client for .NET
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
Usage
Configuration
To use client you need to provide configuration to TestItApiClient
. There 4 ways to do it (sorted by priority ascending):
TestItApiConfig
object
var config = new TestItApiConfig
{
ServerAddress = "example.com",
PrivateToken = "ExampleToken"
};
var client = new TestItApiClient(config);
- JSON-file
{
"serverAddress": "example.com",
"privateToken": "ExampleToken"
}
var client = new TestItApiClient("/path/to/file.json");
Path to JSON-file from
TESTIT_CONFIG_FILE
environment variableServer address and private token from
TESTIT_SERVER_ADDRESS
andTESTIT_PRIVATE_TOKEN
environment variables respectivelyPath to JSON-file from CLI arguments
./yourapp --testit-config-file "path/to/file.json"
- 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 | 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. |
.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. |
-
.NETStandard 2.0
- CommandLineParser (>= 2.8.0)
- Newtonsoft.Json (>= 13.0.1)
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.