Skip to main content
Version: 2.x

Installing ZIO Test

In order to use ZIO Test, we need to add the required configuration in our SBT settings:

libraryDependencies ++= Seq(
"dev.zio" %% "zio-test" % "2.1.27" % Test,
"dev.zio" %% "zio-test-sbt" % "2.1.27" % Test,
"dev.zio" %% "zio-test-magnolia" % "2.1.27" % Test
)

If our SBT version is older than 1.8.0, we also need to add the test framework manually:

testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")

NOTE: In order to use the live version of a service in our tests, we can use some new helpful test aspects e.g withLiveClock, withLiveConsole, withLiveRandom, withLiveSystem, etc.

ZIO Chat

🔥 Ignite your ZIO journey with ZIO Chat! 🔥 Ready to unravel the intricacies of ZIO? As your trusty sidekick, I'm here to light the way. No matter if you're wandering through functional forests or traversing effectful landscapes, I've got answers to keep you on track. Your ZIO adventure starts here – ask me anything and let's explore together!