Closed timhall closed 5 years ago
I can't get blocks to build...
The current test suite doesn't test WorkbookReporter
which is labeled at the top as a primary benefactor of the changes.
I've tried altering the Tests.RunTests() a bit to wedge everything into a single test suite but can't seem to get the syntax right.
so far, a couple different directions that seem logical but don't work:
Public Function RunTests() As TestSuite
Dim wbr As New WorkbookReporter
wbr.ConnectTo ThisWorkbook.Sheets(1)
wbr.Start 1
wbr.Output NestedTests
wbr.Done
End Function
Private Function NestedTests() As TestSuite
Dim ts As New TestSuite
ts.Name = "RunTests"
Dim TCase As TestCase
With ts.Group("TestSuite Tests")
Dim TTS As TestSuite
Set TTS = Tests_TestSuite.Tests
For Each TCase In TTS.Tests
.Test(TCase.Name).Self = TCase
Next TCase
End With
With ts.Group("TestCase Tests")
Dim TTC As TestSuite
Set TTC = Tests_TestCase.Tests
For Each TCase In TTS.Tests
TCase .Test(TCase.Name)
Next TCase
End With
Set NestedTests = ts
End Function
sorry! trying to be helpful and contribute. how can I get this tested before approving the PR?
Thanks Tim!
Temporarily removed WorkbookReporter, will add it back in a later PR
The goal here is that reporters only take in a single
TestSuite
, but for added flexibilityTestSuite
can contain any number of arbitrarily nestedTestSuite
groups. This should simplify the API forWorkbookReporter
and allow different ways of defining tests.This allows for separating tests and suites among different functions / files.