continuous testing with gradle
Asked Answered
V

1

9

Is there a plugin or some nice way to make gradle compile and test my application in the background?

I know there are some plugins for intellij and eclipse(infinitest amongst others), but I am looking for a general gradle solution regardless of the IDE.

It would be nice to start a testing-deamon and make it use growl or some other notification tool to let me know that the code is not compiling or the tests are failing.

Vannessavanni answered 18/9, 2012 at 7:55 Comment(0)
J
7

Continuous compilation/testing/etc. are features planned for future versions of Gradle. They will be based on the existing Gradle Daemon.

Update:

Gradle introduced the continuous build feature in version 2.5. The feature is still incubating, but we can already use it in our daily development. The continuous build feature means Gradle will not shut down after a task is finished, but keeps running and looks for changes to files to re-run tasks automatically. It applies perfectly for a scenario where we want to re-run the test task while we write our code. With the continuous build feature we start Gradle once with the test task and Gradle will automatically recompile source files and run tests if a source file changes.

To use the continuous build feature we must use the command line option --continuous or the shorter version -t. With this option Gradle will start up in continuous mode. To stop Gradle we must use the Ctrl+D key combination.

http://mrhaki.blogspot.com.au/2015/08/gradle-goodness-using-continuous-build.html

Jorgejorgensen answered 18/9, 2012 at 15:31 Comment(3)
The future has arrived, and the feature hasn't. :(Schutz
Nice! Is it scheduled for a specific release?Vannessavanni
We don't usually schedule features for a specific release, but I'd expect 2.3 or 2.4 to contain some of this (can't say if it's going to be continuous testing).Jorgejorgensen

© 2022 - 2024 — McMap. All rights reserved.