Jackson2 TestRail client

Feign client for TestRail API with Jackson2 annotation models

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем Feign Сеть HTTP Clients Jackson Данные JSON
Группа

Группа

org.touchbit.testrail4j
Идентификатор

Идентификатор

jackson2-feign-client
Последняя версия

Последняя версия

2.2.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Jackson2 TestRail client
Feign client for TestRail API with Jackson2 annotation models

Скачать jackson2-feign-client

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.touchbit.testrail4j/jackson2-feign-client/ -->
<dependency>
    <groupId>org.touchbit.testrail4j</groupId>
    <artifactId>jackson2-feign-client</artifactId>
    <version>2.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.touchbit.testrail4j/jackson2-feign-client/
implementation 'org.touchbit.testrail4j:jackson2-feign-client:2.2.1'
// https://jarcasting.com/artifacts/org.touchbit.testrail4j/jackson2-feign-client/
implementation ("org.touchbit.testrail4j:jackson2-feign-client:2.2.1")
'org.touchbit.testrail4j:jackson2-feign-client:jar:2.2.1'
<dependency org="org.touchbit.testrail4j" name="jackson2-feign-client" rev="2.2.1">
  <artifact name="jackson2-feign-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.touchbit.testrail4j', module='jackson2-feign-client', version='2.2.1')
)
libraryDependencies += "org.touchbit.testrail4j" % "jackson2-feign-client" % "2.2.1"
[org.touchbit.testrail4j/jackson2-feign-client "2.2.1"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.touchbit.testrail4j : testrail4j-core jar 2.2.1
org.touchbit.testrail4j : jackson2-api-model jar 2.2.1
io.github.openfeign : feign-jackson jar 11.0

test (3)

Идентификатор библиотеки Тип Версия
org.touchbit.testrail4j » testrail4j-test-core jar 2.2.1
org.junit.jupiter : junit-jupiter-api jar 5.7.0
org.junit.jupiter : junit-jupiter-engine jar 5.7.0

Модули Проекта

Данный проект не имеет модулей.

TestRail4J CI/CD MavenCentral ReadTheDocs AlertStatus Coverage

Java HTTP-client for the TestRail API.

TestRail4J represented by two client modules with gson and Jackson2 models respectively. This is done for the convenience of the end user, so as not to use unnecessary dependencies in the project if one of the presented models is already used in the project.

Full documentation is available on the testrail4j.readthedocs.io.

Briefly

  • Add repository and necessary feign client
<dependency>
   <groupId>org.touchbit.testrail4j</groupId>
   <artifactId>jackson2-feign-client</artifactId>
   <version>${testrail4j.version}</version>
</dependency>

or

<dependency>
   <groupId>org.touchbit.testrail4j</groupId>
   <artifactId>gson-feign-client</artifactId>
   <version>${testrail4j.version}</version>
</dependency>
  • Build client using TestRailClientBuilder and call the necessary method
public class Example {
    public static void main(String[] a) {
        TestRailClient client = TestRailClientBuilder
                                    .build("user", "pass", "http://localhost");

        Project project = client.addProject("name", "announcement", true, 3);

        Section section = new Section()
                .withName(UUID.randomUUID().toString())
                .withDescription(UUID.randomUUID().toString());

        Section section = client.addSection(section, project.getId());

        Case caze = new Case()
                .withTitle("test_20190101201312")
                .withPriorityId(CRITICAL.getId())
                .withSuiteId(section.getSuiteId())
                .withRefs("JIRA-123")
                .withTypeId(ACCEPTANCE.getId())
                .withTemplateId(TEST_CASE_TEXT.getId())
                .withEstimate("1m 45s")
                .withCustomPreconds("withCustomPreconds")
                .withCustomSteps("withCustomSteps")
                .withCustomExpected("withCustomExpected")
                .withCustomStepsSeparated(null);

        Case caze = client.addCase(caze, section);
        System.out.println(caze.getId());
    }
}
  • You can build the Feign client yourself and customize it to fit your needs.
TestRailClient client = new Feign.Builder()
    .client(new Client.Proxied(sslContextFactory, hostnameVerifier, proxy))
    .encoder(new GsonEncoder())
    .decoder(new GsonDecoder())
    .logger(new CustomLogger())
    .logLevel(FULL)
    .requestInterceptors(Arrays.asList(interceptors))
    .options(new Request.Options(10, TimeUnit.SECONDS, 60, TimeUnit.SECONDS, true))
    .errorDecoder(new CustomTestRailErrorDecoder())
    .target(TestRailClient.class, "https://testrail.custom");

Modules (org.touchbit.testrail4j)

  • jackson2-feign-client - Feign client with jackson2 models.
  • gson-feign-client - Feign client with gson models.
  • gson-api-model - Gson annotated models (DTO).
  • jackson2-api-model - Jackson2 annotated models (DTO).
  • testrail4j-core - Base implementation of common classes for the Feign client (without depend of models).
  • testrail4j-schema - Json schemas for TestRail API.

Restrictions

TestRailClient#addCaseField(TRCaseField)

The returned object for the method of creating a new test case custom field is not available until the correction of the defect

org.touchbit.testrail4j

TouchBIT

Projects are mirrored from https://gitlab.com/TouchBIT

Версии библиотеки

Версия
2.2.1
2.2.0
2.1.1
2.0.1-beta
1.1.5-alpha