Failgood is a test runner for Kotlin focusing on simplicity, usability and speed. more...
@Test
class MyFirstFailgoodTest {
val tests = testsAbout("my perfect test suite") {
it("runs super fast") {
assert(true)
}
describe("tests can be organized in subcontexts") {
it("just works") {}
}
}
}
While other test-runners are still busy scanning your classpath for tests, failgood is already running them in parallel, and if your test suite is lightweight and well written maybe its already finished. This is failgood running its own test suite on a Macbook Pro M1:
239 tests. 235 ok, 4 pending. time: 479ms. load:508%. 498 tests/sec
239 Tests in 0.4 seconds. Your test suite could be so fast too.
Failgood is boring at runtime. Every test runs with fresh dependencies, just like in JUnit, see test lifecycle. For advanced lifecycle option look at More on lifecycle
Everything is just kotlin. Want to reuse a group of tests? extract a function for them.
Want to run a test conditionally? put an if
around it
To create parameterized tests use forEach
more...
Failgood works well with IntelliJ IDEA, Gradle, your favorite assertion library and code coverage tools.
Contributions are always welcome, please look here
To see it in action check out the failgood-example project, or a project that uses Failgood, for example the "the.orm" test suite or the restaurant test suite