[Cppunit-devel] Re: Testing individual test cases in a suite
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2002-05-05 10:32:57
|
In version 1.8.0, you needed to grab the instance of the test case you want to test, then pass it to the test runner. Test hierarchy exploration can not be done without dynamic cast (to know if a test is a TestSuite or a TestCase). Version 1.9.? removed that needed by introducing a composite interface in Test. The generic test runner (CppUnit::TestRunner) accept a test path as parameter. You can just give the name of the test you want to run, which in your case is of the form: FixtureName.TestCaseName Single test case name are prefixed by the fixture name to provide a unique name and raised ambiguities that would otherwise be raised in test report (you often have the same test case name in different fixture, such as testConstructor() for example). See TestPath documentation for further details. Baptiste. ----- Original Message ----- From: "Jordan" <jor...@eu...> To: <gai...@fr...> Sent: Friday, May 03, 2002 5:01 PM Subject: Testing individual test cases in a suite > Hi, > > Using 1.8.0 on Linux. > > I have been trying CppUnit of late and have taken the > recommendation of the CookBook to use the Helper macros. > This works great if you want to run all tests or all the > fixtures in a named register. However, what if you only want > to run one test case defined inside a fixture which has been > assigned to a named registry? > > I have looked at the 1.9.6 snapshot and you seem to be > attempting something like this with TestPath but I do not > know how to go about using it. > > So, > > a) Is there a way to to what I want in 1.8.0 > b) Can I do this in 1.9.6 and if so how? > > If the answer is in the documentation point me in the right > direction as I cannot find it there. > > Many thanks, > > J. > > > > |