AgitarOne - generating JUnit Tests... but there is a price to pay...
Submitted by Antony Marcano on Fri, 17/11/2006 - 13:39.
test driven development | unit testing
[textile]About 9 months ago, I spent some time with one of the guys from Agitar, looking at their Agitator product. I held back from recommending it to a client because the client was just getting to grips with Test Driven Development.
"If only you could use it to turn its observations into JUnit Tests. What a great way to plug any gaps you might have left in your own tests!?!?!?" I thought. I envisaged the team writing their code Test-Driven and then using Agitator to plug any gaps they might have left.
This particular team were keen enough on using TDD to design their code that I was confident that they would be disciplined and only "Agitate" when they really thought they were done. In fact, I think it would have encouraged additional rigour... and a bit of competitiveness - i.e. aiming for the lowest number of new tests found by Agitator.
But, alas it didn't generate JUnit tests. If I applied any of the observations it made to be assertions then I'd be completely tied into the product too. I didn't like that... especially since it seemed to run quite slowly when I "Agitated" the code (compared to running JUnit Tests).
I even mentioned the idea to "Jeffrey Fredrick":http://www.developertesting.com/archives/individual_weblogs-jeffrey_fredrick-index.html over drinks at "XTC":http://www.xpdeveloper.net/xpdwiki/Wiki.jsp?page=Xtc20060523 a couple of months later... Well, it looks like they knew this already... In fact, I dare say that the wry smirk on his face at the time was because they were already working on it but he just couldn't say anything yet ;-)
"AgitarOne":http://www.agitar.com/solutions/products/agitarone.html now provides "JUnit Test Generation":http://www.agitar.com/solutions/products/automated_junit_generation.html. I am excited to try out the latest version... If you watch the "AgitarOne demo":http://www.agitar.com/downloads/junit_generation_skin.swf you'll see that the marketing is targeted at developers who don't use TDD, however, if you use your imagination, you'll see how it can augment the tests that result from test-driven developed code.
The licensing model is also unusual -
AgitarOne is licensed through an annual subscription fee for use on a specified number of unique Java classes.I imagine that it may be out of reach for many organisations, however, since Agitar quote the entry-level pricing at... Wait for it... "USD $ 50,000 Per year!":http://www.agitar.com/news/pr/20061115.html (or free for educational institutions) I imagine that many organisations will find this price a hard pill to swallow. It may be possible to illustrate ROI in any number of ways but I think that number alone will mean a lot of lost sales opportunities. I hope there is a 'professional' edition that freelance developers and small business can acquire since many of the best developers I know are independents or have small companies. I know they and I would find it useful to augment our own tests and it's a shame that this tool would be out of reach for a large number of users.
