... Yes, and I agree with "might". A test, to me, has a concept, an idea, that is being tested. Three asserts together might be what's needed for that idea:...
... I've looked at your whole note, and I want to suggest that you have what you need -- you have examples of bad tests, and you have even given them names. ...
... Not. This forum discusses "Programmer Tests". A "Unit Test" is a test whose failure implicates one (1) and only one (1) unit. A "Programmer Test" only...
... I respectfully deconcur. Since the practice does generate high-quality tests, it's a great place to look and see what "high quality" might mean. Ron...
... cause ... Try: "It's not about making a list of these resulting properties as instructions to learn by rote." The problem with such an approach is that...
... True. But the resulting properties might serve as tests for the tests. Ron Jeffries www.XProgramming.com The main reason that testing at the end of a...
... Simply put, my Customer said so. Their form has 56 fields. A multi-step form only invites complexity. -- J. B. Rainsberger, Diaspar Software Services ...
... I absolutely agree, I'm a big advocate of extract class(es) when it becomes obvious that a class is trying to do more than a single job. However, this...
Thanks Paul, But isn't starting at the DB layer Bottom-up work vs. Top-down. It seems like you'll start adding features that'll violate the YAGNI principle....
... My solution? To make the class multiple smaller classes. The more code within a class or method can indicate that the class is trying to do too many...
... In such a case , I just write a detailled failing error message. ... <msg> loop 12 failed : reason : the intention "doLongFooAndThenBar(12)" shouldn't be...
It may be true that your spec mandated that you have 56 different form elements. Maybe you can group these elements into logical components that you can test ...
... My solution to this has been to add a method such as public void testConvinceEclipseToSeeInheritedTestMethods() { //presence of this passing test works...
Tony, I have just done this, but I'm not too concerned about whether or not the SQL is broken - I just expect my tests to cover the relevant cases. I figure ...
... Actually, the rule is that there should be a test class for each class. The question of how many test methods there should be depends on the functionality...
This is an good list. I would put a questionmark on limiting try/catch and loops, as I use them quite much in my testing. However, the loops are never in the...
... I'd use a "real" database - but "real" in this case is short for "really minimal." Translated into English: prior to running the test suite, create a...
Edmund Schweppe
schweppe@...
Dec 2, 2003 5:11 am
5936
Chapter 7 of next pragmatic programmers book about unit testing has some qualities http://www.pragmaticprogrammer.com/starter_kit/ut/index.html ... From:...
... Actually, I don't care how many test classes there are. I care that there's a failing test for every line of code I write. I care that I've tested ...
... I do this, too; however, if the test name is already good enough, why not use it? That's the point behind Parameterized Test Case/Suite: name each fixture,...
... There is one place where I might do this to remove duplication (there are two addresses), but other than that, why break it up? If I can test the 56 form...
Andrew McDonagh wrote: <snip /> ... This is usually how I make every method public: extract collaborators that now /have/ to communicate through public...
Hello Alistair, Monday, December 1, 2003, 11:20:14 AM, you wrote: BA> Which DBMS do you have the displeasure of using? There are xUnit frameworks BA> for some...
Hello Edmund, Monday, December 1, 2003, 7:27:43 PM, you wrote: ES> If the create/drop process takes too long for happy TDDing, then don't ES> run the whole...
Cliff, ... That's how I tend to think. I often find myself working with an existing db and need to work within that structure making changes to the db schema...
So, here's an example.... Let's say I'm working on a project to, say, score a bowling game. I've got a series of tests all written, the most recent one being:...
Hi everyone, In order to make certain classes behave how I want for testing, I've been extending the production concrete class and overriding the parts I want...
... Yes. Extract the interface, then use EasyMock (I'll assume Java here) to mock the interface dynamically. I extract interfaces at the drop of a hat. It...
... If you do these things, and do them incorrectly, will the existing tests show the defect? Ron Jeffries www.XProgramming.com I'm not bad, I'm just drawn...