XpdWiki
Set your name in
UserPreferences Edit this page Referenced by
JSPWiki v2.0.52
![]() ![]() |
Just had to start this page with a title like that ... Lets define AllTestsPassWorld first. If that's the case then ... No I think MockPeople? just lay down the pieces that make testing easier to implement, and so encourage the code base in the direction of an AllTestsPassWorld, but end with a AllTestsPassThatMatterWorld. What this comment misses is that TestsMustCommunicateTheIntent of the code, and the problem that it is trying to solve, while at the same time trying to preserve good coding practices. When we ran these experiments at ConneXtra (at the very extreme) we ended up with what is called MockObjects today (writing no getters, and trying to communicate the intent of the code through tests). The problem is that that nuances of a good test and what it communicates are very tricky to achieve - so getting 100% coverage is not enough - you need close to 100% test comprehension as well (it might not need 100% as you can infer a bit by looking at the code and the test - but the higher the clarity the better the code will age). Unfortunately, many so called mock object tests that I run into are not mock objects at all (witness the numerous articles that reference MockObjects and have totally missed the point), and are not particularly clear to read - unfortunately its not an easy silver bullet, but its certainly a very good way of writing code and tests if you have the discipline -- TimM I have to mostly agree with TimM; IMO the worst mistake people make with MockObjects is making MockObjects that do stuff; they need to be really simple; I'd always recommend using some sort of AutomatedMockObject thing. IvanM If I'm dreaming about tests passing then I roll back to where they do and go sleep. I assume this is a play on DoAndroidsDreamOfElectricSheep? --OliBye
|