How Do You Launch a Debugger When a Test Fails?

Answer

Configure the debugger to catch the java.lang.AssertionError exception and suspend the execution.

Call the TestRunner to run the test under the debugger.

When the test fails again, The debugger will suspend the execution and start the debug mode.

Now you are ready to use debugger commands to find the code issue that causing the fail.

How you configure this depends on the debugger you prefer to use.
Most Java debuggers provide support to stop the program when a specific exception is raised.

All unit-testing Questions

Ask your interview questions on unit-testing

Write Your comment or Questions if you want the answers on unit-testing from unit-testing Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---