ScalaTest User Guide Getting started Selecting testing styles Defining base classes Writing your first test Using assertions Tagging your tests Running your tests Sharing fixtures Sharing tests Using matchers Testing with mock objects Property-based testing Asynchronous testing Using Scala-js Using Inside Using OptionValues Using EitherValues Using PartialFunctionValues Using PrivateMethodTester Using WrapWith Philosophy and design Migrating to 3.0 |
Using ScalaTest with Mill
ScalaTest's object test extends ScalaTests with TestModule.ScalaTest { def ivyDeps = Agg( ivy"org.scalatest::scalatest:3.2.19" ) } Running Tests
Your test source files go into > ./mill test
If you want to run particular suites, you can use > ./mill test.testOnly org.acme.RedSuite org.acme.BlueSuite Or you can specify a glob: > ./mill test.testOnly *RedSuite
To run only tests affected by your latest code changes, either in main or test, you can use > ./mill test.testCached Specifying ScalaTest ArgumentsYou can pass arguments to ScalaTest after the test command: > ./mill test -oD
If you are using def testCachedArgs = Seq("-oD") |
ScalaTest is brought to you by Bill Venners and Artima.
ScalaTest is free, open-source software
released under the Apache
2.0 license.
If your company loves ScalaTest, please consider sponsoring the project.
Copyright © 2009-2025 Artima, Inc. All Rights Reserved.