CheckOps
MUnit
MUnit is an Apache-2.0 Scala testing library from Scalameta with a minimal JUnit-based API, actionable error messages with diffs, fixtures and support for JVM, Scala.js and Scala Native.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
MUnit is a Scala testing library with actionable errors and extensible APIs, maintained by the Scalameta organisation. It deliberately keeps a small API: test suites extend munit.FunSuite, tests are declared with test("name") { ... }, and assertions are assert, assertEquals, assertNotEquals, intercept and a few others. That simplicity makes it fast to learn and quick to compile.
MUnit is implemented as a JUnit runner, so it works with sbt, Maven, Gradle and IDEs that understand JUnit, and it supports Scala 2 and 3 across JVM, Scala.js and Scala Native. Failure messages include colourful diffs and source locations, making them easy to act on. Features include test-local and suite-local fixtures, Future-returning tests, tags and filtering, flaky-test marking, and integrations for ScalaCheck (munit-scalacheck) and Cats Effect (munit-cats-effect). Version 1.3.6 was released on 3 September 2026.
The source code is at scalameta/munit on GitHub under the Apache-2.0 licence, with about 474 stars; the most recent commit was on 5 November 2026.
Features
- Minimal API: Small, easy-to-learn surface.
- Actionable errors: Diffs and source locations on failure.
- JUnit-based: Works with standard build tools and IDEs.
- Cross-platform: JVM, Scala.js and Scala Native.
Pros
- Free to use: Open source under the Apache-2.0 licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 5 November 2026.
Cons
- Fewer styles: No BDD-style specs like ScalaTest’s WordSpec.
- Smaller matcher set: Plain assertions rather than a matcher DSL.
Usage and Links (Example)
// build.sbt
libraryDependencies += "org.scalameta" %% "munit" % "1.3.6" % Test
class PricingSuite extends munit.FunSuite {
test("applies discount") {
assertEquals(Pricing.apply(100, 10), 90)
}
test("rejects negative prices") {
intercept[IllegalArgumentException](Pricing.apply(-1, 0))
}
}
Resources:
Pricing
MUnit is free and open source under the Apache-2.0 licence.
Recommended for?
- Scala teams wanting a simple, fast test library.
- Typelevel and Cats Effect users, via munit-cats-effect.
Conclusion
MUnit offers a refreshingly simple Scala testing experience with excellent error messages and broad platform support.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with MUnit side by side.
SScalaTestScalaTest is an Apache-2.0 testing toolkit for Scala and Java with many testing styles (FunSuite, FlatSpec, WordSpec and more), rich matchers and integration with sbt, Maven and IDEs.Compare with MUnit
Sspecs2specs2 is an MIT-licensed Scala library for writing executable software specifications, offering unit and acceptance specification styles, matchers and integration with ScalaCheck.Compare with MUnit
SScalaCheckScalaCheck is a BSD-3-Clause property-based testing library for Scala and Java, inspired by Haskell's QuickCheck, with generators, shrinking and stateful testing, used by ScalaTest, specs2 and MUnit.Compare with MUnit
JJUnit 5JUnit 5 is the current JUnit for Java and the JVM: Jupiter for new tests, Platform to launch them, Vintage to run JUnit 4.Compare with MUnit
KKotestKotest is an Apache-2.0 Kotlin multiplatform test framework with multiple testing styles, a large assertions library and built-in property-based testing.Compare with MUnit
Jjqwikjqwik is an EPL-2.0 property-based testing engine for the JUnit Platform, letting Java and Kotlin developers write properties with generated, shrinking inputs alongside regular JUnit 5 tests.Compare with MUnit