How do you programatically get test results into a variable
How do you programatically get test results into a variable
I am trying to create my own report and need to get the status (success / fail) of a validaton. How do I get that into a variable.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How do you programatically get test results into a variable
Hello,
In general the return value of the Validate.Exists() method is a bool.
If the validation failed, the return value is False otherwise it is True.
You can just write it in a variable using the following code:
Please let me know if you need more information or assistance.
Regards,
Bernhard
In general the return value of the Validate.Exists() method is a bool.
If the validation failed, the return value is False otherwise it is True.
You can just write it in a variable using the following code:
string myVar = Validate.Exists(path, searchTimeout, message, exceptionOnFail).ToString();You can just write it in your report using Report.Info(myVar).
Please let me know if you need more information or assistance.
Regards,
Bernhard