Gradle is deeply integrated into IntelliJ for building and executing tests, so you can use your favorite IntelliJ workflow to run and re-run tests. A few are listed below.

  • In the Project tree, right-click a test source file or directory and select Run
  • Next to the test method signature, click the green triangle button and select Run myTestMethod()
  • In the test results pane, right-click on a previously run test and select Run myTestMethod()

IntelliJ and Gradle also supports stepping through tests under a debugger. Using the same workflows as above, instead of selecting Run <xyz>, use Debug <xyz>.

  • No labels