/buːn/ (noun) a thing that is helpful or beneficial
boon is a small framework for testing pure code. boon is:
- Opinionated
- Focuses on testing pure code
- Has no external library dependencies
- Fast
- Strongly typed
- Easy to run in the REPL
boon is inspired by ScalaCheck - which is a simple but very powerful Property-Based Testing framework.
Some things that are unique to boon:
- Purity - test failures don't throw Exceptions
- First Class Assertions - Assertions can be named and combined
- Failure context - Failures can have write out a context of all useful information
- Two failure modes - Assertions can either fail on the first error or continue running the remaining Assertions
Add the following to your build.sbt
file:
libraryDependencies += "net.ssanj" %% "boon" % "1.0.3" % Test
testFrameworks += new TestFramework("boon.sbt.BoonFramework")
resolvers += Resolver.bintrayRepo("ssanj", "maven")
You can now run all the usual sbt
test commands such as: test
and testOnly
.
For more information see the following links: