hamkrest alternatives and similar libraries
Based on the "Tests" category.
Alternatively, view hamkrest alternatives based on common mentions on social networks and blogs.
-
Kotest
Powerful, elegant and flexible test framework for Kotlin with additional assertions, property testing and data driven testing -
kotlin-faker
https://serpro69.github.io/kotlin-faker/ Generate realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data anonymization purposes. -
hikaku
A library that tests if the implementation of a REST-API meets its specification. -
balin
Balin is an automation library for Kotlin. It's basically a Selenium-WebDriver wrapper inspired by Geb. -
SeleniumBuilder
Kotlin DSL for Selenium. Provide a possibility to write tests in Kotlin type-safe builders style -
arbitrater
Arbitrater is a Kotlin library for creating arbitrary instances of classes by reflection for use in testing. In contrast to POJO generators, it supports Kotlin's optional parameters and nullable types. -
aspen
Aspen is a simple test runner for Kotlin that allows you to write tests using your own DSL. -
mock-fuel
JUnit 5 extension to easily test with the http client Fuel for Kotlin
Appwrite - The Open Source Firebase alternative introduces iOS support
Do you think we are missing an alternative of hamkrest or a related project?
Popular Comparisons
README
Hamkrest - Hamcrest for Kotlin
An implementation of Hamcrest to take advantage of Kotlin language features.
Note: as of version 1.4.0.0, you must add kotlin-reflect to the classpath to use Hamkrest's reflective features.
Getting Started
Add Hamkrest as a dependency of your project. Hamkrest is distributed via Maven Central.
Import matchers from com.natpryce.hamkrest
. E.g. a quick way to get started is to import com.natpryce.hamkrest.*
and then use IntelliJ to optimise imports when you're done.
If you're using Hamkrest for assertions, import com.natpryce.hamkrest.assertion.assertThat
Now you can make assertions about values using matchers:
assertThat(thisName, equalTo("Alice"))
assertThat(thatName, equalTo("Bob"))
... and so forth
More Information
- [Matching numbers](docs/numbers.md)
- [Composing matchers](docs/compose.md)
- [Using function and method references as Matchers](docs/function-references.md)
- [How Hamkrest describes values, and how you can plug in your own descriptions](docs/describe.md)
- [Hamkrest's version numbers explained](docs/version-numbering.md)