I have in my project a lot of unit tests, written in JUnit and TestNG. The building process is based on maven with surefire plugin.
Is there any way/plugin for maven to fail the build when at least one unit test takes too many seconds? I know that there are some plugins to fail build in TeamCity, Jenkins but this is "too far".
In my project I want to have only fast tests to have unit testing process effective. I can improve my old tests but I need to protect for the future commitments