Running tests


Tests can be run by just invoking the test task (gradlew test). Currently, there is no way to run a specific test via Gradle.


To run tests in IntelliJ IDEA or Android Studio you need to install Spek Framework plugin (search for Spek Framework).


Running tests for Android projects in IntelliJ IDEA is not supported, please use Android Studio.

The plugin will allow you to:

  • Run all tests in a package (there should be an option under Run -> Spek(s): <package> when right clicking a package in the explorer)
  • Run specific scope via the gutter icons. gutter_icons
  • See at a glance failed tests from the reporting window. test_tree
  • Navigate to the failing test via the test tree (Right click the failing entry then Jump to Source or press F4). Do note that Jump to Source does not work if you run all tests within a package.

When using Gradle, please set Build Tools/Gradle/Run tests using: to Intellij IDEA. You can use Choose per test to show all possible options.