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

Ranorex Spy, Recorder, and Studio.
cdwillis911
Posts: 5
Joined: Fri Oct 18, 2013 9:24 pm

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

Post by cdwillis911 » Fri Nov 22, 2013 9:56 pm

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
Capture.JPG (10.8 KiB) Viewed 734 times
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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

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

Post by Support Team » Tue Nov 26, 2013 12:41 pm

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
.
Image

cdwillis911
Posts: 5
Joined: Fri Oct 18, 2013 9:24 pm

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

Post by cdwillis911 » Tue Nov 26, 2013 7:26 pm

Thanks Markus - that worked great!