Categories
Development

SOA explained (sort of)

This article over at JavaWorld tries to explain just what SOA means. It’s still fuzzy. 🙂

What it all boils down to is that it’s a buzzword for integration, and that when you provide services you should provide a separate stable interface to represent them. It doesn’t really matter if that interface is WS, EJB or Corba. What’s new for WS is that all the vendors are jumping on the bandwagon and agreeing on XML and some extra services like transactions and security.

Use integration when you need to. Forget about it the rest of the time. I shiver when I hear someone ask in a planning meeting if we should do SOA…

Categories
Development

Fast testing of EJBs

Javaworld has an article where Nader Aeinehchi uses a combination of XStream, OpenEJB and JUnit to test EJBs with a low roundtrip time of 3sec. Anyone that has worked with projects that use EJBs know that this is a relatively short time.

One of the interesting concepts of the article was actually using XStream for specifying mock data to pass the EJBs and services. I feel kind of stupid for not thinking of this before. Next time around. 🙂

Categories
Development

Acceptance tests from user defined rules

A friend of mine is writing his thesis on automated acceptance testing of applications. He’s making a plugin for Eclipse that will let you specify flows, actions, inputs and outputs. Sort of what you would do if you designed a web flow…

Today I stumbled upon this article by Dave Thomas. He writes about using table driven programming for specifying rules and the next actions to take. In his experience it is easy for the users to analyze, and maintain these tables. These tables would also be somewhat along the lines of what FitNesse does for acceptance testing. So by getting the users to specify the rules you would have both the logic of some parts of the program, as well as material to validate the system.

An acceptance test would also include input and output values, but the overall logic of flows and actions could be shared between implementation and validation. The tables might be easy for users to to maintain and use, but so would something like Spring WebFlow too? Maybe even easier? Paired with the right tools like Gaijin Studio, this could make a pretty powerful tool. I havn’t tried Gaijin Studio yet, but you might have to make some special abstractions. It looks like it’s abstraction is a little bit too low level for even advanced users. Make abstrations and limit some of the possibilities the user has, and it could be really powerful. If a user makes changes and adds new steps, the developers would be responsible for implementing the additions.

When doing acceptance tests, these flows could be complemented by adding inputs and expected outputs, and run to check for expected behaviour.

Maybe it’s even been done? It seems too good a idea to not have been though about before. Or maybe it’s actually too difficult, and I don’t see the problems…