LogClass - Could use some setup info
I am trying to use the LogClass class to help write to a log file.
My problem is doing some initial setup.
Basically we run all out tests from a suite.
I want to be able to create a log globally somehow so testcaseenter / exit as well as any testcase I run I can report to the log
Basically I want to be able to set this up globally where it will create a new log and then append after for every testcase i run.
object log = LogClass("SmokeTest.log.html")
Any help would be great
Re: LogClass - Could use some setup info
Since it is making a web page, doing an append after stoping a test, then starting another test is a bit tricky (since the closing section of the table has already been added).
If a series of testcases are ran, then it will append for each on - you have the Log.Destructor () just at the very end of whatever you are testing (Log.Destructor() puts in the closing html tags).
Another thing you can do is set:
Log.AppendMode = true
and then do not call Log.Destructor() until the very end of all your testing.