Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

how to make a test hierachy?

kenneth
2007-10-07
2013-04-22
  • kenneth
    kenneth
    2007-10-07

    hi
    i'm trying to figure out how to make a hierachy of tests, to get a tree structure displayed in the TreeHierarchyDlg ( i use MFC ).
    it appears that i have to use test suites and register them with some macro, but which?
    i would like a structure like this:
    + all tests
      + testsuiteA
      | + testcase1
      | + testcase2
      + testsuiteB
        + testsuiteC
        | + testcase1c
        | + testcase2c
        + testsuiteD
        | + test case1d
        + testcase1b
    etc..
    how can that be done ?-
    thanks.

       

     
    • HRD
      HRD
      2007-10-10

      cppunit-1.12.0.tar.gz
      See unit tests of cppunit: cppunit-1.12.0/examples/cppunittest/CppUnitTestSuite.cpp
      ./CppUnitTestMain
      Running
      StringToolsTest::testToStringInt : OK
      StringToolsTest::testToStringDouble : OK
      ...
      XmlUniformiserTest::testElementsHierarchyWithContents : OK
      XmlUniformiserTest::testAssertXmlEqual : OK

      OK (220)

      ./CppUnitTestMain "/All Tests"
      OK (220)
      ./CppUnitTestMain "/All Tests/UnitTestTool"
      OK (12)
      ./CppUnitTestMain "/All Tests/UnitTestTool/XmlUniformiserTest"
      OK (12)
      ./CppUnitTestMain "XmlUniformiserTest"
      OK (12)