The many tools for testing

As Arquillian has become steady at the programmer’s tool belt, its action scope has entered debate as some feel it’s an integration testing specific tool and some others see it as the long awaited tool which will bring end to end testing as the only testing a programmer needs from now on. The latter is the motivation of this post as it forgets about the power of unit testing and might not see that Arquillian’s purpose may change depending on the extension you use.

The power of unit testing.

When you drive your design with tests it’s crucial you get feedback on your tests in little time as possible. Within 100 ms you get this feedback from a unit test. If you need to start an application server this would take at best two seconds if, and only if, you’re using a lightning fast start server; otherwise it takes much longer. Remember, the first run you expect the test to fail, and, is in the second run where you expect a green bar.

Time alone should make my case, but a more subtle problem derives from this. Your focus and train of thought are interrupted which directly impacts on quality and productivity. Therefore you need your unit tests as much as you did before.

Arquillian and integration testing.

From its very beginning Arquillian kept his word and delivered what offered: to make integration testing a breeze. Being able to test your components over the application server just by setting up some classpath dependencies is just amazing. This combined to a lightning fast server start, moved integration testing from the nightly build to the local build. This changed software development permanently.

Of course you still need what Lasse Koskela dubbed as “test doubles” and include stubs, mocks, spies and others. Remember, an integration test isolates a component from its collaborators while running it over an environment configuration closer to production. Imagine an integration test called shouldGroupBooksToDeliverByTheme and fails because the taxes calculation routine is wrong…

Arquillian Drone and functional testing.

Much of the strength of Arquillian lies in how easy is to extend. One of the most interesting extensions is Arquillian Drone which enables testing of functionality across all the system, from the user interface to the persistence layer. A QA engineer dream come true.

This kind of test depends on starting a browser which is remotely commanded by Selenium 2. This is all code so you won’t be showing this to the business people and it takes around one and a half minute or two, so you’ll keep it your nightly build.

Arquillian Drone plus Fitnesse and living documentation.

When you specify with examples most wonderful cases are recorded for later verification. Hopefully this verifications are exercised every night so they are in good shape any time a stakeholder needs to check on the software state.

Natural language exemplified on tabular data and run under the hood over the real deal. It doesn’t get better than that. This has been rounding my head for a couple of months but haven’t found the time to make it work yet. Once I do I’ll be really yelling it everywhere!

As I see it, these are the current and potential powers these tools bring into the testing field. But this powers are to fight different evils, not to replace each other. At least not yet.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s