thijskok / api-java-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TestMonitor API Java Client

This client provides a convenient Java wrapper for the TestMonitor API.

Table of Contents

Installation

Before you start, make sure you have a recent Java SDK installed.

Maven Installation

We recommend installing the API client in your Java project using Maven. Add it as a dependency to your Maven configuration:

<dependency>
    <groupId>com.testmonitor</groupId>
    <artifactId>api-java-client</artifactId>
    <version>1.1</version>
</dependency>

Manual Installation

If you prefer a standalone JAR library, checkout this repository and run Maven to compile the sources and generate a JAR file:

    $ git checkout https://github.com/testmonitor/api-java-client.git
    $ cd api-java-client
    $ mvn package

Your JAR file will be available in the target directory.

Usage

If you haven't done so, make sure to create an API token in TestMonitor.

Start with a new client instance by providing your TestMonitor domain and API token:

Client client = new Client("example.testmonitor.com", "t0ps3cr3t")

Now you can start interacting with TestMonitor.

To get a list of projects, use the following code:

ArrayList<Project> projects = client.projects().list();

Use this code to create a new test suite and test case (for project ID 1):

Project project = client.projects().get(1);

TestSuite testSuite = client.testSuites(project).create("A Test Suite");
TestCase testCase = client.testCases(project).create("A Test Case", testSuite));

Full documentation is available at our Wiki.

Changelog

Refer to CHANGELOG for more information.

Contributing

Refer to CONTRIBUTING for contributing details.

Credits

License

The MIT License (MIT). Refer to the License for more information.

About

License:MIT License


Languages

Language:Java 100.0%