Hi
I need to exact code to report failure and exit test.
I searched the forum but can not find, please help.
Thanks,
rastek.
How to report failure and exit test.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to report failure and exit test.
Hi Rastek,
You can easily create a failure message within the report with
But you can use the following workaround, in order to exit the test run:
Regards,
Markus (S)
You can easily create a failure message within the report with
Report.Failure("Fail", "The test failed");Unfortunately, the Report.Failure() method does not abort the current test run.
But you can use the following workaround, in order to exit the test run:
Validate.IsFalse(true,"Force to fail");this will cause an exception and the test will abort with the message "Force to fail".
Regards,
Markus (S)