I am using Coded UI for Automation testing. I have already enabled HtmlLogger in QTAgent32.exe.config file. I am getting the html output file. but I am considering to write some messages in that html output file. I used this.TestContext.WriteLine("Message");
to write output in result file (.trx) but it is not writing in output html output file. Is there any solutions to write in html file while test is running?
Any help would be highly appreciated !
Asked
Active
Viewed 2,550 times
3

S.Roshanth
- 1,499
- 3
- 25
- 36
-
I think only debug trace shows up in html log (Debug.WriteLine) – kida May 30 '14 at 09:42
-
No it is not writing on html output file.Debug.WriteLine() writes on debug trace in standard output. – S.Roshanth May 30 '14 at 10:18
-
By html log you mean the UITestAcntionLog.html or the UITestLog.html? – kida May 30 '14 at 10:30
-
I mean UITestAcntionLog.html with all actions screen shots. – S.Roshanth May 30 '14 at 11:00
-
See http://blogs.msdn.com/b/gautamg/archive/2009/12/08/logging-a-message-in-test-result-as-part-of-an-automated-test.aspx for five ways of logging in Coded UI tests – AdrianHHH Jun 03 '14 at 11:21
-
I tried this, but non of this ways allow to write in UITestActionLog.html file. – S.Roshanth Jun 03 '14 at 11:24
1 Answers
2
I found that there is no direct way to write into UITestActionLog.html but we can hand code in UITestActionLog.html file by getting the file path and write using HtmlTextWriter class. Please refer to the link. MSDN Answer

S.Roshanth
- 1,499
- 3
- 25
- 36