开发者

Run JUnit tests automatically before commit in Eclipse

开发者 https://www.devze.com 2023-03-13 09:52 出处:网络
This nearly identical to this que开发者_如何学Gostion with two differences. I want to run unit tests right before commit and not all of the time (accepted answer).

This nearly identical to this que开发者_如何学Gostion with two differences.

  1. I want to run unit tests right before commit and not all of the time (accepted answer).
  2. The answers and comments to the question seem to indicate that the suggested plugins are no longer supported.

Basic problem I am trying to solve is simply forgetting to run unit tests for small quick changes and it seems it should be possible to automate.


On the question you linked to, I mentioned Infinitest. It doesn't fit your item #1, but it only reruns tests that are likely to have broken (presumably it does some kind of clever code analysis -- I don't know the details) so you might find it useful anyway. It is definitely still supported, and in fact it's now open source!


Basic problem I am trying to solve is simply forgetting to run unit tests for small quick changes and it seems it should be possible to automate.

If your tests are fast, you can run them on each save. See this blog by Misko Hevery

Alternatively, you could use a commit hook to run the tests before accepting the update.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号