Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to indentify tests that are failing with mvn test

I have setup maven and surefire for running unit tests. The test classes are configured to run in parallel; i.e. classes

Sometimes when I run "mvn test", some tests fail with a timeout. However, surefire doesn't log which tests were running when the timeout happened. It only logs details of tests that completed.

The timeout seems to be some kind of a deadlock and doesn't reproduce always.

How does one find out which tests were running when the timeout happened? Is there a way to change the log level of surefire itself so that it dumps some messages when it starts running test from a new class?

I am using: Java: 1.6, Maven: 3.0.3, Surefire: 2.14

like image 274
Shri Javadekar Avatar asked Nov 27 '25 16:11

Shri Javadekar


1 Answers

Execute the tests in debug mode

mvn -X test

like image 88
dtelaroli Avatar answered Nov 30 '25 07:11

dtelaroli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!