icon

Run Gradle Tests

Runs tests with gradlew.

This Step runs tests with gradlew. You can specify the test tasks to run and set flags to the executed gradlew command.

Configuring the Step

To use this Step, you need at least two things:

  • Gradle Wrapper.
  • A Gradle task that is correctly configured in your Gradle project.

To configure the Step:

  1. Set the Gradle project root directory in the Project root directory input.
  2. Add the task you want to run in the Test task input.
  3. (Optional) Add any flags you want to pass to the executed gradlew command in the Additional flags input. For example, you can use --tests='*.MyTestClass' to run a specific test class.
  4. (Optional) You can set the file path to a build.gradle file for the Step in the Path to the Gradle build script to use input.

Troubleshooting

If you receive an error that Gradle Wrapper (gradlew) is required, make sure to generate one if you don't have one already. You can read more about it in the official Gradle guide.

Useful links

Related Steps

Similar steps

Run all your automated tests in just 15 minutes, no matter how many tests you have

This step uploads and schedules tests on Microsoft App Center.

Run a test plan on Autify for Mobile.

Danger automates common code review chores during your CI process.