Menu

Multiple nested levels of tests?

Help
Zog Bog
2010-03-02
2012-10-22
  • Zog Bog

    Zog Bog - 2010-03-02

    If I create multiple test classes, and AddTest new instances of each of them,
    the runner groups tests within each particular class, so that I can expand or
    hide all in a group via a "+" button, and I can specify to run all of them in
    a group by selecting that group.

    I would like to continue this same concept, but with multiple nested levels,
    not just one nested level.

    For example, currently I generally make a test class for each interface of
    each class being tested, which means the runner groups tests by interface and
    class being tested.

    I would instead like to make it group things by class, and then within the
    class group them by interface, and possibly within the interface group them by
    function.

    Is there a way to do this?

    Thanks in advance, and thanks for making SimplyVBUnit available in the first
    place.

     
  • Kelly Ethridge

    Kelly Ethridge - 2010-03-02

    Hello,

    Yes, you can do multiple levels as you described. You can create instances of
    TestSuite and add your test classes to the suite and add the suite using
    AddTest.

        Dim ClassOneTests As TestSuite
        Set ClassOneTests = Sim.NewTestSuite("ClassOne Tests")
        With ClassOneTests
            .Add New ClassOneTest1
            .Add New ClassOneTest2
        End With
        AddTest ClassOneTests
    
    ' add other test suites
    

    You can even add TestSuite instances to other TestSuites.

    Hope this helps,
    Kelly

     
  • Zog Bog

    Zog Bog - 2010-03-02

    Thank you!

     

Log in to post a comment.