Running tests in a watch mode encourages test-first thinking and creates a virtuous cycle. Here’s the command to run a Gradle Wrapper (Java) test suite in watch mode:
./gradlew test --continuous
Gradle calls this a “continuous build.” It runs when tests or files under test change.
- Continuous Builds – Gradle Docs