What is Exception Handling in Software Testing/Automation?
Handling run time errors, this inturn ensure that the test execution flow is not interrupted.
Technically exception is an object thrown at run time.
In software testing we skip the statements which has error and resume to further test execution.
What are the Types of Exceptions
- Recoverable
- UnRecoverable
There are 2 types in Recoverable Exception
- Checked Exception - This is Checked at Compile Time, Extended by ThrowableClass.
- IOException
- SQLException
- Unchecked Exception - This is Checked at Run Time, Extended by RunTimeException
- Arithmetic Exception
- Null Pointer Exception
- Number Format Exception
- Array Index Out of Bounds Exception
UnRecoverable exceptions are basically errors, some of which are listed below,
- Out of Memory Error
- Virtual Machine Error
- Assertion Error
Keywords in Exception Handling
Keywords are an import aspect in exception handling. Some of which are as below,
- Try
- Catch
- Finally
- Throw
- Throws