Specification by Example on a mainframe

I got this question recently from a reader, and I thought that the answer might be interesting to others as well:

in my quest to introduce Specification by Example, I just realised that our Mainframe people are going to react with:
“That’s all very nice, but we program in Cobol on the Mainframe, so this won’t work for us.”
That is their usual reaction, to any change.

Their fear of change apart, it would be good to know that the technical barrier after which they hide, can fall.Do you know of any tools / people / … that support Specification by Example on Cobol?

I find that specification by example works best when the complexity is in understanding the stakeholder needs and communicating effectively, in particular related to producing requirements and assuring quality, in processes that support frequent software changes. The fact that a team is working in Cobol on a mainframe does not necessarily mean that they have or do not have these issues. If they do experience a lot of rework, low quality, slow change or misalignment of analysis, testing and development, then implementing SBE or some of the ideas of SBE can help. If they do not experience those problems, or those problems aren’t important, SBE is probably not the thing to implement.

In Specification by Example I intentionally do not talk about tools, and in Bridging the Communication Gap the tools are very late in the book. From my experience, many software teams focus too much on a particular tool and not on the collaboration and the process improvement ideas. (I did this as well when I started, we decided to “implement FitNesse”). A tool is important as it helps the process go smoother, but the fact that there isn’t a tool for a particular environment shouldn’t stop you from organising workshops to define specifications collaboratively and illustrating requirements using examples. I know several team that do not automate their tests but still get a lot of value from discussing the specifications collaboratively.

For Cobol and mainframe in particular, I don’t know of any existing tools that integrate with that environment out of the box and my knowledge of that whole ecosystem is very limited. However, many opensource tools have a TCP wire protocol (including Cucumber and Fitnesse), so if their environment can support TCP sockets you can easily implement a link to execute tests with that. Another option is to use TextTest which does checks on text files, so as long as their system produces text output (such as logs) or you can grab some textual record of what happened (such as sql dump into a text file) text test will enable you to describe and automate tests in a way that supports specification by example.