Reputation: 12382
I'm looking for an IntelliJ IDEA plugin that would run my tests each time I change my code. I looked for such a solution and I found:
There are lots of ways I could run all my tests (including writing a simple script for this), but I'm looking for a tool that would be smart enough to rerun failed tests first, and that would understand module dependencies (so after a change in some module it would run only tests of dependent modules).
I prefer free options, but if there's something paid for a reasonable price, I would accept it as well.
Upvotes: 45
Views: 19703
Reputation: 11788
I found out a way to enable SBT style auto test execution in IntelliJ studio.
We need to do two things to enable auto test execution.
File -> Settings -> Build, Execution... -> Compiler
and selecting "Build Project automatically"
.This will start auto testing. Although this works fine, it takes time to build the project even when my project is tiny so for larger projects it will certainly take very long time to complete the build and execute tests.
Reference: Original article which explains these steps
Upvotes: 29
Reputation: 697
If you are OK running tests which cover a single method chosen by you, you can try this plugin (it is continuos in the sense that you make changes to a method, then click on the method and the plugin will run all the unit tests automatically which cover that method): https://plugins.jetbrains.com/plugin/15063-unit-test-coverage-history-runner
Upvotes: 2
Reputation: 931
IntelliJ now actually has a Toggle auto-test
in the run dialog. Just run a run-configuration and then select Toggle auto-test
in the run dialog.
It's not as intelligent as you would have hoped. It just reruns when it detects changes.
Upvotes: 31
Reputation: 3739
You can use the Intellij Teamcity
plugin. Teamcity is a paid product but there is a free version which gives you 20 projects and 3 agents for free .
Usage instructions for Remote Run
Upvotes: 0