Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automate running tests before commit in Intellij Idea, without additional software?

Is it possible or is it absolutely necessary to install TeamCity in order to automatically run tests before a commit?

like image 411
Bulwersator Avatar asked Feb 17 '14 20:02

Bulwersator


1 Answers

Short answer: No. Long answer: I suppose you could do your commit using maven, and have the tests run before the commit occurs, stopping the build (and therefore the commit) if the tests fail. Team City however will not easily allow you to run tests before a commit, as it uses your vcs to access the code you want it to build and test, although you can configure it to allow a private build on your personal git branch, pulling your changes into the head only if your tests all pass, but this is overkill for most teams, and you can probably achieve something similar with Jenkins/Hudson or any other CI server.

like image 113
Software Engineer Avatar answered Sep 22 '22 08:09

Software Engineer