Recently I have spent some time writing many acceptance tests (AT) in a row for a project while working at Quinary. Usually I spend not too much time with the customer, helping her writing a few AT for each iteration. It can be 30′ or 1 hour a week on average, rarely more than that (and only at the beginning of the project or a new release). Working that way you end up writing AT in little bursts.
This time it was different. We were using Fitnesse like a tool for writing executable specifications (more on this in further posts). It is not interesting here to discuss why we were doing that, but in the end it meant writing tens of AT without even a single line of code. The project itself was just a brainstorming about a possible product, therefore there was no intention (yet) to really code anything. But writing executable specs helped understanding the different areas and functionalities that we eventually need to address.
Whatever the reason, I now have many AT, some of which are really similar to each other. Even more: some of those tests are slightly equal, they look to be different instances of the same pattern. For example: whenever we have forms used to enter new entities (ala DDD), there is always a test that tries to insert duplicated data, check that it fails and check the actual error.
This is just a simple example, but it already contains all the elements that are typical of a pattern language, expressed in the vocabulary of functional elements.
While I’m pretty sure that this concept isn’t really new, it seems that it is different from what specified for example with the BuildOperateCheck pattern: this pattern works at the Fit level, and it is so general to comprise almost any Fit test that doesn’t follow the other well-known pattern represented by flow-style actions in FitLibrary.
To put it simpler, what I’m trying to say is that there seems to be emerging patterns at the functional level, working at a lower level than general-purpose Fit/Fitnesse patterns. It may also be that specific domains will have their own (even more) concrete patterns.
This opens interesting possibilities.