Arquillian: End of Test Hell on Earth
I know I‘ve been talking a lot lately about the 60 Minutes piece about slot machines. There is probably a delicate balance between engaging the reward center in the brain in a way that promotes fluid, ‘zone‘ performance (Vronsky on the horse), and entrancing it and turning it to mush. There‘s no doubt, however, that once you start making the brain wait, its focus tends to flag, and the reuptake is stupidly wasteful.
One of the things that struck me when working with Arquillian tonight was that one of the other really great things about it is when you go to run your test, you end up seeing less unfocused verbose load blubber, which is awesome. When using the Spring test classes, you would start out pretty lean, with a test-context.xml, but then pretty soon, that would be fatted up with tons of garbage and each run you would be looking at the same stupid stuff happening over and over again.
Last week we were working on some pieces that were triggering jobs that imported data from government feeds. I sat and watched it for a while. The stupid thing kept trying to download the same 5 links each time. When I brought that to the attention of one of the other guys on the team, he said ‘yeah, it‘s spidering the main page and each one has those links in it, which are not files, so it figures that out after fetching the header, but maybe we should spider the detail page?‘ Turned out the detail page had only the file links and they were tagged with a CSS class (which dom4j supports in its XPath).
Why do I bring this up? Well, logically, there are only 2 choices: watch, look, wonder, or stalk the graveyard with the zombies. It‘s no wonder most people end up zombified though, given the tools they are using. Imagine if you were driving to Vegas and the instrument panel in your car was repeating the same crap over and over again about how it was sending the fuel to the injectors, the spray was happening, some combustion just happened. Actually, I would say tool makers own a lot of this, but the logging tools own a piece too: logs are still way too stupid. There should be easier ways to not see the same things over and over again. Especially in a test!! If my test fails and I think my code is ok, I can always rerun it with other log settings, but it‘s too onerous to go fiddling with the dumb logger between runs (inline DSL needed, preferably not in Groovy…).
Anyway, seriously, I complain a lot on here. Arquillian really is awesome. I am from the Meyer school of noise is a pernicious enemy. And delay is a form of noise. Having JBoss 6 running and just repeat running the tests from my key mapping is a freaking joy. Huge improvement over the Spring tests.
My last remaining question on Arquillian is the existential cosmological one: where is the edge of the universe? I am going to try to find out by writing up some JSFUnit 2 tests this week. Meantime, great job on this guys.