Raj_Qa
14 years agoContributor
Test Logs when emailed
I have Testcomplete setup to send out the test logs to a group when the tests fail. When the test log file(MHTML) is saved and opened it shows the tests have passed, but the actual log has a red cross, but in the emailed log it has a tick stating the test passed.
Sub GeneralEvents_OnLogError(Sender, LogParams)
log.Message("Script execution stopped because of an error")
FileName = Project.ConfigPath & "ExportedLog\MyResults.mht"
Call Log.SaveResultsAs(FileName, lsMHT)
If SendMail("***********@gmail.com", "******", "***", "****net", "Notification", "This Email is sent from TestComplete.","C:\SmokeTests\Smoke_Test (1)\Smoke_Test\Smoke_Test\ExportedLog\MyResults.mht") Then
Log.Message "Mail was sent"
Else
Log.Warning "Mail was not sent"
End If
End Sub
Sub GeneralEvents_OnLogError(Sender, LogParams)
log.Message("Script execution stopped because of an error")
FileName = Project.ConfigPath & "ExportedLog\MyResults.mht"
Call Log.SaveResultsAs(FileName, lsMHT)
If SendMail("***********@gmail.com", "******", "***", "****net", "Notification", "This Email is sent from TestComplete.","C:\SmokeTests\Smoke_Test (1)\Smoke_Test\Smoke_Test\ExportedLog\MyResults.mht") Then
Log.Message "Mail was sent"
Else
Log.Warning "Mail was not sent"
End If
End Sub