Available on Jetbrains Marketplace: https://plugins.jetbrains.com/plugin/15063-unit-test-coverage-history-runner
There are some other plugins which automatically re-run tests when a change is detected, but these plugins just use static code analysis to find the tests which directly call the changed code. This does not work if you modifiy a private method which is only indirectly called in a test. This plugin works in this case as well because it saves which methods are called during the runtime of a test.
This plugin lets you click on a method in your project and automatically run all the unit tests which cover that method.
There are two steps to use the plugin:
Also to reset coverage information (in case unexpected tests are run), you can go to Tools -> Reset Coverage Info...
When you encounter any test for which coverage information is not included, file an issue on GitHub.
For example the plugin doesn't work when using empty test methods with the Scenario annotation like @Scenario("integration_tests")
IntelliJ IDEA Code Coverage Agent: https://github.com/JetBrains/intellij-coverage