Re: [Cppunit-devel] standard way to handle test data
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2002-07-18 17:00:14
|
standard way to handle test dataI gave a quick look at this. TestDriver = is our TestRunner and TestContext is our TestResult. Though, the main = difference is that the TestResult is passed to the test method. I don't = believe this to be really necessary. I could understand passing it to = setUp() and tearDown() but to pass to the test method reduce the = decoupling of the test with the outside world (at least to me). On another note, I also gave a quick look over JTestCase. I once = implemented some functional tests based on some Excel sheet. Though, = instead of reading the data in a test case, I read the data in a = subclassed test suite which populated itself by creating a test case for = each set of data. Though, JTestCase seems to go a bit farther than = this... Baptiste. ----- Original Message -----=20 From: Moran Ben-David=20 To: 'Baptiste Lepilleur' ; cpp...@li...=20 Sent: Wednesday, July 10, 2002 9:03 PM Subject: RE: [Cppunit-devel] standard way to handle test data TestContext to me would be a class that would be passed to Tests each = time they are run. The Test receiving the context would use it to = extract data necessary for it's test. =20 In my search for separating the data (e.g. primary keys of rows being = pulled from the database, etc.) from my Test Fixture code.. I came = accross this: =20 http://c2.com/cgi/wiki?TestDriver =20 This page mentions the TestContext class for encapsulating the data = required by a test.. I'm not 100% clear on how I'd like to data-drive my = TestFixtures however, I know I need to as currently I'm hardcoding the, = for example, database primary keys I'm trying to pull from the db to = test my querying code. =20 Forgive my ignorance.. but are you on the cppunit development team? Moran -----Original Message----- From: Baptiste Lepilleur [mailto:gai...@fr...] Sent: Wednesday, July 10, 2002 1:32 PM To: Moran Ben-David; cpp...@li... Subject: Re: [Cppunit-devel] standard way to handle test data Could you explain shortly what is that TextContext class ?=20 Recently, I was thinking about passing the TestResult to the setUp() = and tearDown() methods. I can be done without too much trouble, but I = still haven't come up with some really good reason (might change = though). Baptiste. ----- Original Message -----=20 From: Moran Ben-David=20 To: 'cpp...@li...'=20 Sent: Sunday, July 07, 2002 4:07 AM Subject: [Cppunit-devel] standard way to handle test data Hi.=20 I'm looking for a standard way for making my TestFixtures data = driven. I've read some suggestions about a TextContext class and seen = JTestCase (http://jtestcase.sourceforge.net/).. Rather than write my own = implemention of one or more of these concepts for CppUnit, I'd rather = use a popular implemention. Is there one? Thanks,=20 Moran=20 ---------------------|||| ii3 |=20 Moran Ben-David=20 ii3 Inc.=20 t) 416.595.5232 x294=20 f) 416.595.5224=20 e) mbe...@ii...=20 i) <http://www.ii3.com/>=20 --------------- eBusiness. Your Vision Here.=20 |