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

Ranorex Studio, Spy, Recorder, and Driver.
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
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
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

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!