Skip to content

Instantly share code, notes, and snippets.

@qrman
Last active October 17, 2018 06:15
Show Gist options
  • Save qrman/ff48706a3f0a0c32fac8 to your computer and use it in GitHub Desktop.
Save qrman/ff48706a3f0a0c32fac8 to your computer and use it in GitHub Desktop.
Gradle cheatsheet
  • Execute one integration test:

./gradlew integrationTest --tests=*SomeTestClass

  • Execute tasks parallel:

./gradlew clean build --parallel

  • Skip test:

gradle build -x test

  • Better logging in tests:
test {
    testLogging {
        exceptionFormat = 'full'
    }
}
  • Run application tests with debugger agent
gradle test --debug-jvm
  • Refresh dependencies
./gradlew clean build --refresh-dependencies
  • Run in custom environment
-Dspring.profiles.active=dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment