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

Running your tests

How can you run your tests? Let me count the ways:

1. From sbtuse ScalaTest's Framework
2. From Mavenuse the ScalaTest Maven Plugin
3. From Gradleuse the ScalaTest + JUnit 5
4. On the command lineuse the Runner
5. In the Scala interpreterinvoke execute or use the ScalaTest shell
6. Via Antuse the ScalaTestAntTask
7. From IntelliJ IDEAuse the ScalaTest support in Scala plugin
8. From the Scala IDE for Eclipseuse the ScalaTest Eclipse plugin
9. From NetBeansuse JUnitRunner
10. From Milluse ScalaTest's Framework

Next, learn about sharing fixtures.

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-2024 Artima, Inc. All Rights Reserved.

artima