Reputation: 2361
I have a suite of integration tests that are intermittently failing rarely enough that I can't debug them locally but often enough that my 400 test suite will often have 1 or two failures.
I use Intellij so I can "Run Until Failure", but that doesn't help me debug what's going on.
Is there a way to spit out some sort of debugging information on Exception that lets me do a mock run of the test under the exact conditions of the failure? If not, is there another way to do this rather than just adding tons of logging and running the tests until one fails?
Upvotes: 4
Views: 1073
Reputation: 402493
IntelliJ IDEA has support for Chronon, the time-travelling debugger which may help in your case.
The last compatible IntelliJ IDEA version is 2019.2.4.
Upvotes: 3
Reputation: 802
I do not think this is possible. What would you do if you sent data over a network. You reach your breakpoint and then decide to go back. There is no way to unsend that data. Your software system will never be in the same state again.
You can have a look at the call hierarchy of your stack once you reach a breakpoint and determine places to insert new breakpoints though.
Also you can add.log statements in crucial places so you have some data when a breakpoint is activated. This way you see what happens before in the log.
Upvotes: 0