06-18-2009 09:26 AM
Hi,
Is it possible to change the name of the reported failure during cleanup.
Basically I have a number of tests which may genuinely fail or fail due to a communication timeout.Say I have two tests
If a timeout occurs on one of these tests I set a flag, on cleanup I check this flag and if true I would like to report "Timeout Failure", rather than "Test 1 Failed"
Thanks & Regards,
Don1.
06-18-2009 03:45 PM
Hey Don,
This is probably going to be a lot more complicated because you will have subsequences and stuff but what you want to do is change Locals.ResultList[then the step index value].Status = "Timeout Failure". NOTE: This will not work with on the fly reporting!!
The better option here is to include the SequenceFilePostStepFailure callback and change the status in there. To access the status of that step use: Parameters.Step.Result.Status = "Timeout Failure". You could have a precondition based on your flag and have your flag be a FileGlobal instead of a Local. I've included a small simple example to demonstrate this.
Hope this helps some,
06-19-2009 12:55 PM
Doneen,
Another idea you might want to consider is to make timeouts an error rather than failure. If you set the error for a step you can set the message for the error as well. In this case you can set it to something like "Communications Timeout Ocurred". Making it an error will cause the execution to go to cleanup by default though so I'm not sure if that's what you want, though for timeouts in many cases that is what makes the most sense.
Hope this helps,
-Doug