agiletstware
12 years agoOccasional Contributor
How to print testcase warning/failure message
Hello,
I need to log the test case name, status, and error/warning message (in case of error or warning) to a flat file using a custom .net dll. I have the following code for printing the testcase name and status. Can someone help with how to print out the error/warning message ?
Sub GeneralEvents_OnStopTest(Sender)
Dim tstatus
Select Case( Project.Logs.LogItem(Project.Logs.LogItemsCount - 1).Status )
Case 0
tstatus = "PASSED"
Case 1
tstatus = "WARNING"
Case 2
tstatus = "FAILED"
End Select
dotNET.WriteToFile(Project.TestItems.Current.Name, tstatus , "need to print error/warning message here")
I need to log the test case name, status, and error/warning message (in case of error or warning) to a flat file using a custom .net dll. I have the following code for printing the testcase name and status. Can someone help with how to print out the error/warning message ?
Sub GeneralEvents_OnStopTest(Sender)
Dim tstatus
Select Case( Project.Logs.LogItem(Project.Logs.LogItemsCount - 1).Status )
Case 0
tstatus = "PASSED"
Case 1
tstatus = "WARNING"
Case 2
tstatus = "FAILED"
End Select
dotNET.WriteToFile(Project.TestItems.Current.Name, tstatus , "need to print error/warning message here")