Runner and Trace ready

This commit is contained in:
Christof Thalhofer 2016-09-22 17:20:20 +02:00
parent 81deebac76
commit f28180617f
3 changed files with 10 additions and 11 deletions

View file

@ -62,7 +62,9 @@ Public Sub Reset()
tvTrace.Add("Root", "All Tests")
$RootKey = "Root"
tvTrace[$RootKey].Expanded = True
tvTrace["Root"].Picture = $PictureOk
$ErrPosition = 0
$CurrentKey = "Root"
End Sub
@ -70,8 +72,6 @@ Public Sub ResultEvent_AfterStartTest(oTestCase As ITestCase)
'Set oKey = tvTrace.Keys.Add($CurrentKey.Index, tvwChild, TestName(oTestCase), TestName(oTestCase), cOkImage)
$CurrentKey = TestName(oTestCase)
tvTrace["Root"].Picture = $PictureOk
tvTrace.Add($CurrentKey, TestName(oTestCase), $PictureOk, $RootKey)
tvTrace.Add(GetErrPosition(), "Test Started", $PictureOk, $CurrentKey)
$oTestCase = oTestCase
@ -89,9 +89,6 @@ Public Sub ResultEvent_AfterEndTest()
tvTrace[$CurrentKey].Expanded = True
Endif
$CurrentKey = "Root"
$ErrPosition = 0
End Sub
Public Sub ResultEvent_AfterAddError(oError As TestError)
@ -116,7 +113,13 @@ Public Sub ResultEvent_AfterAddFailure(oError As TestError)
If tvTrace[$CurrentKey].Picture = $PictureOk Then
tvTrace[$CurrentKey].Picture = $PictureFail
Endif
If tvTrace["Root"].Picture <> $PictureError Then
If tvTrace["Root"].Picture = $PictureOk Then
Debug "Root";; tvTrace["Root"].Picture
Debug "Error";; $PictureError
Debug "Fail";; $PictureFail
Debug "Set Fail"
tvTrace["Root"].Picture = $PictureFail
Endif

View file

@ -71,6 +71,7 @@ Public Sub Run(oTestResult As TestResult, Optional ShowDebug As Boolean)
oTestResult.EndTest
$MyContainer = Null
Error.Clear
End Sub

View file

@ -40,11 +40,6 @@ Public Sub Run(oTestResult As TestResult, Optional ShowDebug As Boolean)
Endif
oTest.Run(oTestResult, ShowDebug)
If Error Then
oTestResult.AddError(Error.Code, Error.Where, Error.Text)
Try oTest.TestContainer.TearDownEach()
Error.Clear
Endif
LastContainer = CurrentContainer
Next
If LastContainer Then