From: Mark D. <ma...@ta...> - 2002-08-08 08:46:32
|
On my current project we're endevouring to do XP, and we've started writing alot of DUnit testcases for our Kylix based application. So far I talked my manager into believing the test cases are a damn good thing. Sadly, for about 3 hours this evening we sat pairing trying to work out why some of our new tests were failing. When each test is run individually, they all passed, but when 2-3 were run after the other, they would randomly fail, sometimes all, sometimes the first, the last, or the middle, jumping back and forth between our test cases and the actual code we single stepped, we watched values, and everything looked fine. Mmmmm, really annoying and fustrating. Eventually I added a new test which combined two of the previous tests, but calling TearDown(); Setup(); - this to passed, but failed when mixed with other tests. Eventually we found that the developer who'd originally set up the TestCase unit, had stored a global variable in the implemenation var section, and this variable was being used in a support method in the tests, during parts of the tests this variable was changing value and causing problems with each successive TTestCase instance. Arrrrrrg, damnit, that guys getting a beating in the morning thats for sure.... Grrrr. Mark -- \m/ -- "...if I seem super human I have been misunderstood." (c) Dream Theater ma...@ta... - ICQ: 1934853 JID: ta...@my... |