开发者

Prevent from committing code that didn't pass the unit tests (eclipse & Perforce)

We want to verify that there are no unit tests for the committed code that fails before allowi开发者_JS百科ng the developers to commit. Do you know any tool that will help us?


I'd recommend against doing this, because in practice there are times when you want to allow developers to submit code that does not pass all its unit tests. Also, consider that developers might try to work around the restriction by deleting unit tests, or by not writing them in the first place.

And how could the tool determine that all unot tests passed? It would have to build the code and run the unit test-suite. A fault in the build environment or the test-suite might therefore make it impossible to check-in code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜