Topic
1 reply Latest Post - ‏2013-07-25T08:53:00Z by unsavvy
Jerome.Russ
Jerome.Russ
1 Post
ACCEPTED ANSWER

Pinned topic COBOL and TDD

‏2013-07-17T02:33:50Z |

Hello,

I am wondering if anyone with IBM's COBOL tool suit has any experience with doing Test Driven Development using COBOL.  I read a bit about COBOL Unit, but I couldn't find any real-world examples of its use.  Any help on finding some good examples or perhaps a case study, would be great.

When I searched Cobol Cafe's forums for "TDD", I found nothing.  This leads me to think the dominant position on TDD with the mainframe is, its not worth the investment.  So, I must ask:  Is that the dominant perception?

Thanks,

Jerome

  • unsavvy
    unsavvy
    2 Posts
    ACCEPTED ANSWER

    Re: COBOL and TDD

    ‏2013-07-25T08:53:00Z  in response to Jerome.Russ

    If you talk of TDD, you talk of unit testing. This means, you must be able to unit test before you can think of performing TDD development.

    As far as I could find out, there is only very little information available about testing other than application or acceptance testing. I have therefore started a survey to try and shed some light on this subject (see my other post).

    In the past years, I found the following basic attitudes in several companies I have been in contact with:

    • Some are simply unable to perform unit testing because they still have monolithic applications, so the smallest unit is about the same as the application. If so, unit testing does not make sense.
    • Some do not see an advantage in unit testing. They believe application testing is sufficient, while unit testing more or less delays development. My believe is, they could hardly be wronger.
    • Some have recognized that they need unit testing for one of these reasons:
      Either they started iterative development , leading them to the requirement to re-test their increments in each iteration.
      Or they started reengineering great parts of their software, leading them to the requirement to perform regression testing on the unit interface level. 

    Of those who have recognized the value of unit testing for their software development process, I found three types:

    • They decide not to perform unit testing, instead putting more time and effort in application testing. 
    • They perform unit testing by implementing test drivers. This often leads to the point where test drivers are not updated when interfaces change due to lack of time. This often occurs late in the project when application testing takes the lead. However, this means that when changes are to applied in later projects, they find a lot of not working unit tests. 
      So while it started well, after a while the unit tests are neglected and become more and more useless.
    • To overcome this, some companies have created their own tools (because until about two years ago, there was no standard tool available) to enable themselves to perform unit testing in a simple way and with less time and effort.

    To eventually speak of TDD, my perception is that TDD is a great concept, and I know several people who believe TDD is a great method. But I do not know any company or project really performing TDD on a regular basis. To me it seems as if the value of unit testing is not yet recognized well enough to be able to value the TDD approach. But some companies are on the way now.

    I'd appreciate to learn other opinions and experiences!