This needs some re-visit on your code. But below item will give you the some idea how to configure
1) You add the ReportingFunctions.js[available in the thread] into your existing project as a script unit.
2) You insert the below lines of code in corresponding event [more about events handlers refer here]
In OnStartTest event
ReportingFunctions.setLogsPath("C:\\AutomationLogs\\")
ReportingFunctions.setExecutionStartTime(aqDateTime.Time())
ReportingFunctions.setTestCaseExeStartTime(aqDateTime.Time())
ReportingFunctions.fn_createtestcasedescription("Module1","YourTestCaseID","YourTestCaseDescription","YourEnvironment");
In OnLogCheckpoint event
function GeneralEvents_OnLogCheckpoint(Sender, LogParams)
{
ReportingFunctions.fn_createteststep(1,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);
}
In OnLogError event
function GeneralEvents_OnLogError(Sender, LogParams)
{
ReportingFunctions.fn_createteststep(0,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);
}
In OnLogEvent event
function GeneralEvents_OnLogEvent(Sender, LogParams)
{
ReportingFunctions.fn_createteststep(3,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);
}
In OnLogMessage event
function GeneralEvents_OnLogMessage(Sender, LogParams)
{
ReportingFunctions.fn_createteststep(3,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);
}
In OnLogWarning event
function GeneralEvents_OnLogWarning(Sender, LogParams)
{
ReportingFunctions.fn_createteststep(2,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);
}
In OnStopTest
function GeneralEvents_OnStopTest(Sender)
{
ReportingFunctions.setTestCaseExeEndTime(aqDateTime.Time());
ReportingFunctions.fn_createtestcaseduration();
ReportingFunctions.fn_completetestcase();
ReportingFunctions.setExecutionEndTime(aqDateTime.Time());
ReportingFunctions.fn_generatehighlevelreport();
}
Then run your test, you will be able to see the HTML reports