embedded-toxiproxy-junit4

Toxiproxy embedded server and client for Java integration testing

Лицензия

Лицензия

Категории

Категории

JUnit Тестирование компонентов
Группа

Группа

io.github.coffee-break
Идентификатор

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

embedded-toxiproxy-junit4
Последняя версия

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

0.2.0
Дата

Дата

Тип

Тип

pom.sha512
Описание

Описание

embedded-toxiproxy-junit4
Toxiproxy embedded server and client for Java integration testing
Ссылка на сайт

Ссылка на сайт

https://github.com/coffee-break/embedded-toxiproxy
Система контроля версий

Система контроля версий

https://github.com/coffee-break/embedded-toxiproxy

Скачать embedded-toxiproxy-junit4

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
io.github.coffee-break : embedded-toxiproxy-core jar 0.2.0
junit : junit jar 4.12
eu.rekawek.toxiproxy : toxiproxy-java jar 2.1.3

runtime (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.30

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

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

embedded-toxiproxy

Toxiproxy embedded server for Java integration testing

Build Status codecov.io

Maven dependency

Maven Central:

<dependency>
  <groupId>io.github.coffee-break</groupId>
  <artifactId>embedded-toxiproxy-junit4</artifactId>
  <version>0.1.0</version>
</dependency>

Usage

Running ToxiproxyServer is as simple as:

ToxiproxyServer toxiproxyServer = new ToxiproxyServer();
toxiproxyServer.start();
// do some work
toxiproxyServer.stop();

Or you can use junit rule as:

@ClassRule
public static ToxiproxyServerRule toxiproxyServerRule = new ToxiproxyServerRule(ToxiproxyServerConfiguration.builder().timeout(5000));

Also a client junit rule has been provided to use as:

    private final static ProxyConfiguration proxyConfiguration = ProxyConfiguration.builder()
            .name("database")
            .host("localhost")
            .listenPort(9124)
            .upstreamPort(9123)
            .build();

    @ClassRule
    public static final ToxiproxyRule databaseWithToxiproxy = new ToxiproxyRule(proxyConfiguration, new SqlDatabaseServerRule());

Toxiproxy version

Currently only 2.1.4 is provided

License

Licensed under the Apache License, Version 2.0

Contributors

Changelog

0.1.0

  • Initial release

0.2.0

  • Add ToxiproxyRule for simplified setup

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

Версия
0.2.0
0.1.0