Thank you for posting this question in the forums!
I think what you are missing is "Report.End()" statement that should be run as the last line of code unless you need to submit some report totals to an API or something similar that happens after a test run.
Please make sure you have all the following lines in your solution
Code: Select all
TestReport.Setup(ReportLevel.Info, "MyAmazinglyAwesomeTestReport_%S_%M%D%Y_%T.rxlog", true);
Please note that because of test setups and teardowns these lines to not appear together like this in my solution. It is broken up into several sections. I even have try/catch blocks that look for exceptions, and then update the error reason. For error handling you might want to set up two variables. One is a bool called "testIsFailed", and the other is a string called "testFailureReason". This allows me to try/catch exceptions, and in my case I add a bunch of information on the failure to the report in a section that does not appear if the test is passed.
I can send you an example in NUnit if you like. NUnit is not that different than CodedUI. Please contact [email protected]
if you would like this example.
I hope this information is helpful to you!
-- M. Kendall McIntosh
Automation Support Engineer