Page 1 of 1

Trying to set a variable as pass/fail based on execution

Posted: Fri Nov 22, 2013 9:56 pm
by cdwillis911
Hello all,

I have set up an email script which emails out the zipped report when the test completes. What I'd like to add to this, in the subject line of the email, is "PASS" or "FAIL" depending on the result of the OVERALL report.

I am trying to find out where the value that gets output into this section of the report is stored:
Capture.JPG
Basically, I want to figure out where that "Success" is stored and then set that to a string in my send mail code and then output it to the subject of the email.

I've tried searching around and it seems like the only results I can find are for test cases rather than the entire test suite. I don't want that much detail, only pass/fail for the ENTIRE suite.

Thanks,

Chris

Re: Trying to set a variable as pass/fail based on execution

Posted: Tue Nov 26, 2013 12:41 pm
by Support Team
Hello Chris,

If you just want to know if the test suite failed or passed you could use the error code of the test suite in the program.cs: error = TestSuiteRunner.Run(typeof(Program), Environment.CommandLine);.
Error code -1 (FAILED) or 0 (PASSED).

If you want to log more information I would suggest to take a look at the following forum posts: Send Mail Module and Send an email of Test Results.

Regards,
Markus

Re: Trying to set a variable as pass/fail based on execution

Posted: Tue Nov 26, 2013 7:26 pm
by cdwillis911
Thanks Markus - that worked great!