1. My automation once completed would log off all the log messages in an text file. My problem and query is regarding the log warnings which fail to append in the text file. Can anyone tell me to overcome this situation.
I have messages such as: LogWarning("....") and i would like to have all my log warnings to be appended to my log file after completion of the automation.
2. My automation is done using the suite file. I need to create and start a timer at the start of the first test script file and stop the timer at the end of the last test script file. How can i do this?.... I tried creating global instances of the timer and the creation or starting of the timer seems to be fine but the stopping creates a prob like...it throws a error msg variable not set...How can i overcome this...can anyone give me an sample code of the same??
1. I am not sure why LogWarning is not appended.
Are you using your functions for the log files for the warnings too?
A snippet of code would help here too just to show how the function is called for errors and warnings.
You could override the dunctions LogWarning and LogError with your own function in which you could log the error or warning and then call the LogWarning and LogError functions.
2.I think that you are setting the timer using TimerCreate in the first testcase, then after that testcase has been run, the Timer variable is reset and you will have to set it again . I dont think you can use it across .t files.
If you only need the execution time, it does come in the results file or you could use DateTime functions to get the time at the start and end of the suite run and get the difference at the end.