RE: [Cppunit-devel] standard way to handle test data
Brought to you by:
blep
From: Moran Ben-D. <mbe...@ii...> - 2002-07-18 17:10:18
|
Thanks for examining my points.. I think I'm a bit confused by the term TestResult.. Due to it's name, I was under the impression that it is the output of the test.. where as TestContext (due to it's name) would be the input.. perhaps I misread one or the other.. I'll reread and examine the way TestResult is passed to the test method.. thanks again. moran -----Original Message----- From: Baptiste Lepilleur [mailto:gai...@fr...] Sent: Wednesday, July 17, 2002 3:52 PM To: Moran Ben-David; cpp...@li... Subject: Re: [Cppunit-devel] standard way to handle test data I 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 ----- From: Moran <mailto:mbe...@ii...> Ben-David To: 'Baptiste Lepilleur' <mailto:gai...@fr...> ; cpp...@li... <mailto:cpp...@li...> 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. 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: http://c2.com/cgi/wiki?TestDriver <http://c2.com/cgi/wiki?TestDriver> 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. 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 ? 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 ----- From: Moran <mailto:mbe...@ii...> Ben-David To: 'cpp...@li...' <mailto:'cpp...@li...'> Sent: Sunday, July 07, 2002 4:07 AM Subject: [Cppunit-devel] standard way to handle test data Hi. 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/ <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, Moran ---------------------|||| ii3 | Moran Ben-David ii3 Inc. t) 416.595.5232 x294 f) 416.595.5224 e) mbe...@ii... i) < http://www.ii3.com/ <http://www.ii3.com/> > --------------- eBusiness. Your Vision Here. |