Continuous testing with IntelliJ Idea

会有一股神秘感。 提交于 2019-12-02 21:09:00

IntelliJ now actually has a Toggle auto-testin the run dialog. Just run a run-configuration and then select Toggle auto-testin the run dialog.

It's not as intelligent as you would have hoped. It just reruns when it detects changes.

I know this is a 3-year-old question but I think it will help people who face the similar problem in future. So I found out a way to enable SBT style auto test execution in IntelliJ studio.

We need to do 2 things to enable auto test execution.

  1. Enabling auto project build - This can be done in settings by going into File -> Settings -> Build, Execution... -> Compiler and selecting "Build Project automatically".

  1. Enabling "Toggle auto-test" in run dialog box

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

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 .

  1. It has a remote run feature using which you can send in unchecked code to run tests before committing.
  2. It also has options to run failed tests first

Usage instructions for Remote Run

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!