How Do You Launch a Debugger When a Test Fails?
Submitted by: AdministratorConfigure 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.
Submitted by: Administrator
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.
Submitted by: Administrator
Use a Error Collector inside the catch block
Submitted by: Rekha
Submitted by: Rekha
Read Online JUnit Job Interview Questions And Answers
Top JUnit Questions
☺ | What Is JUnit? |
☺ | Why Does Poeple Import org.junit.Assert Statically? |
☺ | How To Wirte a Simple JUnit Test Class? |
☺ | Why Do You Use JUnit to Test Your Code? |
☺ | How Do You Launch a Debugger When a Test Fails? |
Top Testing Categories
☺ | Manual Testing Interview Questions. |
☺ | Rational TestSuite Interview Questions. |
☺ | QTP Interview Questions. |
☺ | Database Testing Interview Questions. |
☺ | Software QA Interview Questions. |