Error Handling Failed Checkpoints
Hey guys,
I'm working on implementing error handling in my automated tests and I was wondering how other testers approach error handling when it comes to their scripts or keyword tests.
I want to wrap my automated tests in a try-catch statement where the catch statement will launch a function that will refresh the tested application to a default state for the next automated test.
function test1()
{
try{
*Perform Actions*
Checkpoint()
*Continue Performing Actions*
}
catch(e){
setTestApplicationToDefault()
//continue to test2
}
However, I found a tricky situation. When Test Completes checkpoints fail (regions, File, etc..), they will throw errors. In my mind, a failed checkpoint is not necessarily an error. I would like the automated test to continue to completion and I will examine the test log later.
Thanks in advance!