Posted in blog city on May 7th 2004
A recent blog by Sam Pullara details an innovative mechanism of test coverage. Using AOP to get the list of test cases for a given method seems to be a really coool use of latest technology. However, I do believe there must have been products that offer this functionality of listing test cases covering a given method already built into them using different means.
Integrating this with IDEs like Eclipse so that appropriate tests are automatically run as and when a method is modified, seems to be a killer idea. But not sure how many will really be able to use this feature in IDEs primarily because to do a test coverage, one needs to have test cases 😉
In my little experience in this industry,
— Majority of the software projects rarely have a “well defined” unit test cases. Developers like me just skip “unit testing” phase citing it as boring and more importantly have other exciting things (such as blogging, chatting, browsing) to do!
— Even with frameworks such as JUnit, which promise unit testing to be fun, developers have not really started unit testing. Many of the developers still strongly believe that “as long as it compiles, it is unit tested!”. Developers love the challenges that come up when the code does not work as expected at the time of integration. Else, software development will just be damn boring!
— And for very few projects that have well defined unit test cases (in Junit), they love to run all the test cases as many times as possible, since not only it does not cost them any thing to run the same test cases multiple times, it also provides additional sense of satisfaction/achievement for having developed so many test cases. Even if the change is to a single method, they would love to run all the test cases “just to be sure” that the change did not break something else!
Overall, there is no need for IDE communities to slog and implement this killer feature described by Sam Pullara as there will be very few people who will rely on that to conduct thier regression testing.
Comments
#1
|
‘‘ posted this on Fri 7 May 2004, 6:47 pm
Its true, that developers do not write test cases and the reasons are too obvious.
1) Personal aspect – Too boring 2)Confidence – My code WILL run 3) Oversight – I can’t see any reason why someone would change this code in future.Having said that, I see developers getting used to unit test cases. Some by their own free will, some due to pressure from some “Pointy haired boss”. Someone would have put this unit test cases stuff into his head. So atleast to look fasionable, the boss insists on Unit test cases. murali |
#2
|
‘‘ posted this on Mon 17 May 2004, 10:53 pm
It seems to me the usual reason that developers site for not writing unit tests is schedule pressure. (no time!) Not because of a overabundance of confidence in their code or that they find unit testing boring.Pete McKinstry [pete_mckinstry@yahoo.com]
|
Filed under: Java, Technology | Tagged: annotations, Java, junit, unit testing | Leave a comment »