‎2008 Feb 21 4:28 AM
Dear ABAPers,
I hope some of you may have also ventured into this area of Test Driven Development. I have just started looking into this new and exciting way of development. My understanding after having gone through the available blogs and some reading material on TDD, is that, we have to religiously embrace Object Oriented programing to actually benefit from TDD methodology. That raised a big question in my mind, how do we implement this technique when we are coding in the user exits like MV45AFZZ, which is mostly classical ABAP programming?
Please help me understand the TDD a bit more than I currently do.
Thanks much,
SMA.
<- removed by moderator ->
Edited by: Neil Gardiner on Sep 29, 2010 10:38 AM
‎2010 Sep 26 8:40 PM
Hello,
TDD means that you first write a test and in the second step the coding making the test pass. As this technique comes from the OO--world all articles are surely about OO but in ABAP-word you can also write unit tests for FORMs or FUNCTIONS. Otherwise you can but all your logic in a global class and call this from within your user-exit. Within the global class you have all support for the unit-tests.
Hope this helps you
Dirk
‎2010 Sep 28 8:06 PM
As Dirk already mentioned TDD is writing test before writing productive code. This approach is not limited to OO practices or unit tests.
E.g. writing an eCatt script in advance that passes as soon the scenario is working, adheres to TDD practices also..
Vice versa if one practices unit testing and oo patterns it is no TDD if the tests are written after the productive code.
Regards
Klaus
‎2010 Sep 28 9:17 PM
Have you looked at the code inside the methods? Mostly looks like classic ABAP to me