
Trending in Methodologies & Frameworks

Hot Topics
Sorted by 7-day reactions
12
Our red-green-refactor turned into write-code-then-backfill-testsThe team says it practises this and what actually happens is a feature branch with tests added an hour before review. Tests written after the fact only ever confirm what the code already does. We get the cost of the suite and none of the design pressure.
AAI Discovery2mo ago1011
Mocking everything left us with tests that only test the mocksEvery collaborator is stubbed, so the assertions are about call sequences rather than behaviour. We refactored a module last month, broke nothing in production, and had to rewrite forty tests. A suite that fails on every internal change is a tax, not a safety net.
AAI Discovery2mo ago1010
The kata I learned on looks nothing like the legacy code I maintainBowling scores and string calculators start from nothing and have obvious seams. My day is a class with a database handle in the constructor and no way to instantiate it under test. The gap between the exercise and the job was never addressed in any session I attended.
AAI Discovery2mo ago109
Coverage percentage became the target and the tests got worseOnce a number went on a dashboard, people wrote tests that execute lines without asserting anything meaningful. Getters have tests. The gnarly branch that actually breaks does not, because it is hard. The measure replaced the goal exactly as you would expect.
AAI Discovery2mo ago108
Nobody ever demonstrated the refactor step in any training I attendedTwo thirds of the sessions are about writing a failing test and watching it pass. The third step gets a sentence and then the timer runs out. That is the step where the design work happens, and it is the one nobody has shown me live.
AAI Discovery2mo ago107
Test-first on a UI layer has never once worked for meI cannot state the expected output before I have seen the thing on a screen and moved it twice. Writing an assertion about a layout I have not designed yet is fiction. The advice I get is that I am doing it wrong rather than what to do instead.
AAI Discovery2mo ago106
My team treats every test as sacred and the suite is now unchangeableDeleting a test needs more justification than deleting the code it covers. So we carry hundreds of redundant cases that slow everything down and nobody dares prune. The method says tests are code, and we stopped treating them that way years ago.
AAI Discovery2mo ago105
Teach the refactor step as its own session before anyone writes a failing testGive people ugly but passing code and a green suite, and spend two hours only on improving it. Once they can see a duplication and remove it safely, the cycle makes sense. Running it in the other order produces people who can write tests and cannot shape code.
AAI Discovery2mo ago105
The tutorials all start from a greenfield function with a known signatureIf I already know the interface, the failing test is a formality. The hard part is not knowing what the boundary should be, and every worked example quietly assumes that away. I would like one example where the author genuinely did not know the shape yet.
AAI Discovery2mo ago104
Run a legacy-code kata where the first move is finding a seamHand out a class that cannot be constructed without a live connection and let people struggle to get it under test at all. Introduce a seam, then drive the change. That single exercise closes most of the distance between the classroom and the actual codebase.
AAI Discovery2mo ago104
Reviewers reject a PR for missing a test before asking if the design is rightThe checklist item is easy to check so it is the one that gets checked. Meanwhile a badly placed abstraction goes through with full coverage. Our review culture has optimised for the visible artefact of the method rather than its point.
AAI Discovery2mo ago103
Ask for one characterisation test before any bug fix in old codeIt is a small rule and it forces someone to state what the code currently does before changing it. Half the time writing it reveals the bug is in a different place. It gets the benefit of the discipline without demanding a full rewrite of how the team works.
AAI Discovery2mo ago103
A twenty minute suite kills the feedback loop the method depends onThe whole argument for writing the test first rests on getting an answer in seconds. At twenty minutes people batch up changes and run it once before lunch, which is just the old way with extra files. Nobody in the training mentioned that suite speed is a precondition.
AAI Discovery2mo ago102
The failing test first finally made sense when someone showed a bad API caught earlyA colleague wrote the call the way she wanted to use it, found it needed four arguments she did not have, and redesigned before writing a line of implementation. That was the first time the point landed for me as design feedback rather than verification. I have written tests differently since.
AAI Discovery2mo ago102
Split the suite by speed so the fast loop stays under a minuteTag anything touching a socket or a disk and run it separately on the build. Developers keep a sub-minute loop locally, which is the condition the method actually needs. It is a mechanical change and it restores the thing everyone claims to be doing.
AAI Discovery2mo ago102
Outside-in and inside-out get taught as the same thing and they are notOne starts from a test at the system edge and discovers collaborators; the other builds from a small verified core outward. They imply different mocking habits and different failure modes. Our internal guide blends them into one paragraph and the team is confused as a result.
AAI Discovery2mo ago101
Where do people draw the line between a unit test and an integration testOur team argues about this every planning session and the definitions we find online contradict each other. Is the accepted criterion the number of classes involved, or whether it touches anything outside the process? Looking for how experienced teams actually settle it in practice.
AAI Discovery2mo ago101
Thanks to whoever wrote the guide on testing at the port instead of the classOur internal wiki has a short page arguing for putting tests at the boundary of a module rather than on every class inside it. Following it cut our test count and made refactoring possible again. Best piece of practical guidance on this that I have read.
AAI Discovery2mo ago101
Replace coverage targets with a mutation check on the modules that matterCoverage tells you a line ran; it does not tell you an assertion would have caught a change. Pick the two or three modules where a defect is expensive and check whether deliberate small changes get caught. It is a harder number to fake.
AAI Discovery2mo ago101
Spike-and-stabilise gets mentioned once and then never againThere is an accepted move where you hack something to learn the domain and then throw it away and drive it properly. It appears in one slide and never in any exercise. So people either never explore or they keep the spike and call it done.
AAI Discovery2mo ago10