.Net Standard 2.0 implementation of the TestRail API.
var client = new TestRailClient("https://[your-organization].testrail.io", username, password);
var project = client.GetProjects().First();
var runs = client.GetRuns(project.ID);
var suite = client.GetSuites(project.ID).First();
var cases = client.GetCases(project.ID, suite.ID);
for (var case in cases) {
Console.WriteLine($"Test Case {case.ID}: {case.Title}");
}
Solution was built using Visual Studio 2017 (make sure you have the latest version).
- pull latest
- update the TestRail.csproj file with the new
Version
andRelease Notes
- commit and push changes
- pull new code (just for sanity)
- restore nuget dependencies:
.nuget\nuget.exe restore
- rebuild the project using MS Build with the following command:
msbuild /t:pack /p:Configuration=Release
- Make sure that you have msbuild in your path
- The new .nupkg file will be in the
TestRail\bin\Release\
directory.
NuGet push TestRail.<version>.nupkg
- Update the
appsettings.json
with the correct values for the TestRail instance you want to hit. - Run the unit tests from VS Test Explorer or by running
dotnet test TestRail.Tests\TestRail.Tests.csproj
from the root directory.
- Fix for Support for Bulk API Endpoints: Fixed projects lazy loading on the client's initialization.
- Fix for "Could not determine JSON object type" error on bulk results
- Support for Bulk API Endpoints
- Fix templateId parameter for Cases
- Fix error on JObject creation in RequestResult
- Fixed a bug with the client not being able to authenticate.
- Added a testing project.
- Updated the
AddCase()
method to include the template id in the request. - Created new methods
AddResults()
andAddResultsForCases()
to submit results in bulk. - Updated the
GetResults()
,GetResultsForCase()
, andGetResultsForRun()
methods to allow filtering by status id.
NOTE: Custom fields are not yet supported when making bulk submissions.
- Fixed an issue in the
AddRun()
method that made it impossible to add a new run if there is no milestone in project.
- A successful command will now return the appropriate TestRail object according to the official documentation.
- For example:
AddResult()
will now return the newly createdResult
objects. - Official documentation can be found here: http://docs.gurock.com/testrail-api2/start
- For example:
- An unsuccessful command will now include the exception/error that was thrown to better understand what went wrong.
- Add the ability to delete a test run.
- Add Milestones property to handle sub-milestones in GetMilestone call.
- Add description to Section and add custom to run, plan, and other APIs.
- Fix dotnet core bug with HttpWebRequest.
- Converted the application to .Net Standard 2.0
- The client should work with any project on: .Net Framework 4.5, 4.6.1, .Net Core >= 2.0, and .Net Standard >= 2.0.
- Bug Fix
- Timespan field for Result class
- Add isStarted property to Milestone class
- Update Newtonsoft.Json NuGet package
- Bug Fix
- Run's JSON Parse method threw possible ArgumentNullException on created_on field
- Update for VS 2015 and C# 6
- Update Nuget packages
- Features
- Add CreatedOn property to Run class
- TestRail types contain the Raw JSON object received
- Add more fields into Plan
- Update Nuget libraries
- Fix Nuget spec file
- Update dependencies for this package
- Bug
- Result Status Enum for Untested had wrong ID
- Feature
- Get Plan now populates complete run objects
- Get for Configs
- Ability to create a test plan with configs
- Config Ids added to plan entry
- Update Json.net Nuget Package