Time Bomb

Simple test utility for temporarily ignoring unit tests.

Лицензия

Лицензия

Группа

Группа

org.tonicsoft.timebomb
Идентификатор

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

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

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

0.0.0
Дата

Дата

Тип

Тип

pom
Описание

Описание

Time Bomb
Simple test utility for temporarily ignoring unit tests.
Ссылка на сайт

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

https://github.com/tonicsoft/timebomb
Система контроля версий

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

https://github.com/tonicsoft/timebomb

Скачать timebomb

Имя Файла Размер
timebomb-0.0.0.pom 7 KB
Обзор

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

<!-- https://jarcasting.com/artifacts/org.tonicsoft.timebomb/timebomb/ -->
<dependency>
    <groupId>org.tonicsoft.timebomb</groupId>
    <artifactId>timebomb</artifactId>
    <version>0.0.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.tonicsoft.timebomb/timebomb/
implementation 'org.tonicsoft.timebomb:timebomb:0.0.0'
// https://jarcasting.com/artifacts/org.tonicsoft.timebomb/timebomb/
implementation ("org.tonicsoft.timebomb:timebomb:0.0.0")
'org.tonicsoft.timebomb:timebomb:pom:0.0.0'
<dependency org="org.tonicsoft.timebomb" name="timebomb" rev="0.0.0">
  <artifact name="timebomb" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.tonicsoft.timebomb', module='timebomb', version='0.0.0')
)
libraryDependencies += "org.tonicsoft.timebomb" % "timebomb" % "0.0.0"
[org.tonicsoft.timebomb/timebomb "0.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

  • timebomb-junit
  • timebomb-testng
  • timebomb-core
  • timebomb-core-test

timebomb

Build Status

Simple test utility for ignoring a unit test for a limited period of time.

download

timebomb is available from the Maven Central Repository. Junit and TestNG are the supported test frameworks. To use timebomb, simply declare a dependency on one of the following:

What is a Time Bomb?

The obvious drawback of using your test framework's "ignore" functionality directly is that the test may be forgotten about and remain ignored indefinitely. A Time Bomb will allow the test to be ignored until a specified time, after which the test will fail, reminding you to return to it.

Usage

The Time Bomb comes in two main flavours:

  • TimeBomb.blowUpAfter(...) - Run the test normally until the given point in time, after which the test will fail.
  • TimeBomb.ignoreUntil(...) - Ignore the test (i.e. code will not execute) until the given point in time, after which the test will fail.

Example

	@Test
	public void myTest() {
	    // This will do nothing until 2018-01-01, after which it will
		// throw a RuntimeException, causing the test to fail
	    TimeBomb.blowUpAfter(new LocalDate(2018,1,1));

		//This code will continue to run until 2018-01-01
		...
		assertThat(...)
	}

	@Test
	public void anotherTest() {
	    // This will throw an exception (depending on test framework)
		// until 2018-01-01 causing the test to be ignored, after which
		// it will throw a RuntimeException causing the test to fail.
		TimeBomb.ignoreUntil(new LocalDate(2018,1,1));

		//This code will not run until the TimeBomb is removed
		...
		assertThat(...)
	}

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

Версия
0.0.0