Test Driven Development (TDD)

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.
I tried placing this query in different forums on SDN and I am curiously awaiting for some ideas on this topic.
(will reward any helpful replies/suggestions)

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1089283c-133d-2a10-f6b4-f3fd58265fb8
http://www.webopedia.com/TERM/T/test_driven_development.html
http://www.testdriven.com/modules/news/article.php?storyid=605
http://blogs.ittoolbox.com/visualbasic/operating/archives/test-driven-development-life-and-beyond-4672
http://www.testingreflections.com/taxonomy/page/or/53?from=56
http://blogs.ittoolbox.com/visualbasic/operating/archives/test-driven-development-top-10-questions-5084
Regards.

Similar Messages

  • Test Driven Development (TDD) in the ABAP world

    Hi All,
    It's been a long time since I've had any spare time to be active on the SCN forums so firstly hello to everyone.
    I've worked on a number of different SAP technologies over the years, starting with ABAP and moving into BSP, Portal API, Web Dynpro, Visual Composer, etc...  I'm currently working on a 7.01 Portal sat on top of an Oracle database and an old R/3 4.5b system.
    I'm also currently working on methodologies (trying to give something back to my colleagues here at AO) and have hit a bit of a blank around Test Driven Development when working in the ABAP stack.  I use JUnit to help me design, build and test Java based web services, ultimately used in WD, VC and via standalone Java applications.  I'm keen on increasing the adoption of TDD and other XP based practices but it needs to be viable in the ABAP world as well as the Java world.
    Here's my question - does anyone have any suggestions/experiences/guides or even just thoughts around using TDD with ABAP?
    I try to make all code I create service based so I rely on heavy use of componentisation, regardless of the language I am working with.  Obviously this is great with Java and ABAP Objects is also quite good, but sometimes we have to work with good old fashioned ABAP in the shape of programs, function groups and function modules.  I tend to treat a function group as a class and the function modules as the methods when designing and componentising.
    Applying the Java TDD approach, my rough idea is to use class/function groups to package my logic and then extend the class or group with an extra method/module that acts as the unit test routine.  I wonder if there is a better way though?
    It would be good to have a decent discussion in this area and capture everyone's thoughts as I'm sure I'm not the only person thinking along these lines.
    Thanks,
    Gareth.

    Hi Sandra,
    Thanks for that.  I wasn't sure if there'd be a proper SAP solution or not.
    Gareth.

  • ABAP UNIT - Test Driven Development

    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

    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

  • Test driven development with JSF possible?

    Hi,
    I got two questions:
    Is it possible to just make use of the HTML generation part of JSF, meaning creating the component tree and somehow triggering the generation of HTML for that view, without using a custom view handler?
    Second, is it possible to create a component tree OUTSIDE the webcontainer and have it generate HTML for test driven development (JUnit tests not HttpUnit)? Even if it would mean using a mock FacesContext? We do something similar for our code that relies on a plain Servlet context, but because of the request processing lifecycle and all the value/method binding I'm not sure if the same can be done with JSF...
    Thanks in advance,
    Raymond Brandon

    I've looked into these issues some. I specifically wanted a harness for custom controls, per your second request, and a way to do UI unit tests.
    I didn't find much to aid in getting the former to happen and it seemed that creating mocks would be a huge hassle. As for the latter, I did find that there are cactus-based tests in the source code that Sun released, and there are some classes for making JSF testing easier, but the tests they have of their own code are surprisingly thin, and there doesn't appear to be an easy way to just grab a jar or two and start doing your own container tests. The Gamma/Beck book Contributing to Eclipse shows examples of writing UI unit tests that would be hugely useful.

  • Test Driven Development...

    Hi,
    I'd like to hear some pro's and con's about this Test Driven
    Development methodology. Have anyone of you in this forum been
    using this technique for your unit tesing? If so, please share the
    experiences.
    http://www.fusionauthority.com/Techniques/Article.cfm/ArticleID:4560
    Thanks in advance!

    Well doing iterative development is a good thing in general.
    There's no way the customer is ever going to determine all the
    things they want up front... so I've found keeping projects broken
    down into as smallest phases as possible makes it easier to predict
    target dates, and then at the same time you code a bit... test,
    catch technical issues as well as functionality/workflow... so by
    the end of development the end user/customer has what they want,
    and your code is fort knox tested.

  • ADF + TDD (Test Driven Development)

    Hi,
    I'm learning TDD and I'll really appreciate to apply this technique to my Oracle ADF developments.
    With JUnit integration I can easily test my ADF BC and my beans but I now want to develop functional tests.
    So I want to test my JSF pages, redirections and so on.
    I found HtmlUnit, do you know if it's working well with ADF?
    Has you already developed with ADF using the TDD way? What did you learn from your experience?
    Thanks in advance for your help.

    You can integrate HTTP Unit into JDeveloper see this for example:
    http://blogs.oracle.com/shay/2007/08/09
    But also note that there are JSF specific testing frameworks out there that you can try out:
    http://www.infoq.com/news/2007/12/jsf-testing-tools

  • Test-Driven Development for OUAF+Edge application

    Hi Folks,
    I work on a edge application (web application) that is based on OUAF.
    In order to have my test scripts code to be more aligned with developers' code, I want to import the jar file for source code into Open script (oracle testing tool based out of Eclipse IDE) and then develop test scripts and give those test scripts back to developers to run them on JUnit environment before they check in the code to source control. This way, I want to ensure that if any test scripts because of any bugs or regressions.
    And also I want to enable the build team to run these test scripts during build time as part of sanity. This would reduce our testing time a lot.
    What are your ideas and please provide your insights.
    Edited by: OATS Explorer on Mar 16, 2012 12:11 AM

    any ideas on this please, by anyone?

  • Test -Driven Development with the help of Open Script

    Hi Folks,
    I work on a web application that is based on java and other framework, which is more of an extension of java again.
    In order to have my test scripts code to be more aligned with developers' code, I want to import the jar file for source code into Open script and then develop test scripts and give those test scripts back to developers to run them on JUnit environment before they check in the code to source control. This way, I want to ensure that if any test scripts because of any bugs or regressions.
    And also I want to enable the build team to run these test scripts during build time as part of sanity. This would reduce our testing time a lot.
    What are your ideas and please provide your insights.
    Edited by: OATS Explorer on Mar 16, 2012 12:09 AM

    You need to to javascript and ajax. Generic example below but you'll have to figure out the specifics based on what you are doing.
    Checkbox:
    onclick=do_my_stuff(this);Javascript:
    function do_my_stuff(pObj)
      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=DO_STUFF',0);
      get.addParam('x01',pObj.value);
      ret = get.get();
      get=null;
    }PL/SQL application process, on-demand, named DO_STUFF:
    BEGIN
      do_stuff(apex_application.g_x01);
      commit; -- it's up to you if you need to commit or not if do_stuff is performing DML.
    END;Edited by: gti_matt on Jan 11, 2012 1:01 PM

  • Test Driven Development in Pl/Sql

    Hi All,
    TDD is wonderful method of development of application.
    I saw TDD in Java world with My Eclipse IDE, this approache is possible in Pl/Sql world.
    I need to do the POC on it and want to implement in our project.
    If anybody implemented in there projects please share the information.
    Saw some link on google.
    1. There is UTSql package created by Steven.
    2. There is soln given by TOAD.
    Thanks
    Sandeep

    As the saying goes, you can lead a horse to water but you cannot make it drink.
    This is a principle I've found in many development teams. Especially "established" ones that have been working together for at least a year or so.
    To suddenly introduce new practices and new standards... does not work. The bigger/more drastic or different the change, the more painful it is to implement properly.
    So if the developers in the team are not committed to a TDD approach (in PL/SQL or whatever language used), and it is something new and different as far as the practices of that team goes... you may well ask yourself whether it is worth trying to enforce it. I've personally seen a whole dev team (and one of the better ones I've worked with) all resign in a period of 12 months due to being forced down a software development environment and cycle they simply did not accept.
    So whatever approach you choose, you need to make sure that you have the full and complete buy-in of every single developer on that team, and the commitment to follow that approach. At the same time, you need to make the transition for them as painless as possible, and provide the checks and reviews to make sure that this approach is consistently followed until it becomes the SOP for the team members.
    And no amount of fancy TOAD or this or that framework, will address this human accept and make TDD work.

  • Test-driven oracle db development with FIT/FitNesse

    Hi,
    I have just finished testing the first version of DbFit, an extension to Fit.Net which allows database developers to write functional and acceptance tests easily and automate them using FIT (Framework for Integrated Testing) and FitNesse, a popular Web-based test and collaboration server.
    Version 0.1 supports testing stored procedures and functions, queries and statements on Oracle DB.
    Source code, binaries, examples, and a short introductory guide for test-driven Oracle database development using FitNesse and DbFit can be downloaded from http://gojko.net/fitnesse/dbfit
    Your comments would be greatly appreciated.
    Gojko Adzic
    http://gojko.net

    Hi Sandra,
    Thanks for that.  I wasn't sure if there'd be a proper SAP solution or not.
    Gareth.

  • Missing IMethodRule in Test Driven Application

    Hi All,
                  I am working on a test driven application in Flash Builder 4. I am getting 1046: Type was not found or was not a compile-time constant: [org.flexunit.rules]::IMethodRule. error when I compile the application.
    I am using :
    Flash Builder 4 Premium Eclipse Plugin
    Latest Flex SDK 4.5.1.21328
    Please suggest if I am doing anything wrong.

    As the saying goes, you can lead a horse to water but you cannot make it drink.
    This is a principle I've found in many development teams. Especially "established" ones that have been working together for at least a year or so.
    To suddenly introduce new practices and new standards... does not work. The bigger/more drastic or different the change, the more painful it is to implement properly.
    So if the developers in the team are not committed to a TDD approach (in PL/SQL or whatever language used), and it is something new and different as far as the practices of that team goes... you may well ask yourself whether it is worth trying to enforce it. I've personally seen a whole dev team (and one of the better ones I've worked with) all resign in a period of 12 months due to being forced down a software development environment and cycle they simply did not accept.
    So whatever approach you choose, you need to make sure that you have the full and complete buy-in of every single developer on that team, and the commitment to follow that approach. At the same time, you need to make the transition for them as painless as possible, and provide the checks and reviews to make sure that this approach is consistently followed until it becomes the SOP for the team members.
    And no amount of fancy TOAD or this or that framework, will address this human accept and make TDD work.

  • How to test and develop the HTML/Backbone custom content viewer on IPad?

    Hi
    I have been tasked with developing and amending the HTML/Backbone custom content viewer as nicely detailed and explained by Derek Lu here:
    https://www.adobe.com/devnet/digitalpublishingsuite/articles/html-default-library.html#
    I can see that by removing the reference to libs/AdobeLibraryAPI.js in Index.html i am able to "test" on the desktop.
    <!--
        The DPS library/store API.
        The include below should be commented out when testing on the desktop.
    <script src="libs/AdobeLibraryAPI.js"></script>-->
    and that data is bought in via the fulfilment XML feed and the parse method is called on Librarycollection.
    I have made the changes to hook up the viewer to bring in some folios that we are developing.
    However, although this provides the ability to test and develop on the desktop in one form since we are using JS and Backbone, there are various checks within the provided code to see if ADOBE.isAPIAvailable.
    If it is, then the behaviour is different than on the desktop, so once the viewer is packaged up and put on the IPad there is disparity between what you were able to check and test on the desktop version against what is shown on the IPad.
    The question therefore is... is there a quick way to develop and test on the Ipad ... it doesnt seem like a viable option to develop blindly on the desktop and then package up the content viewer within Adobe DPS to check how those changes behave on the IPad?
    To re-iterate the viewer is to make use of backbone / js example to provide greater functionality and options for customisation.
    Thanks in anticipation.
    Dave

    Thankyou for taking the time to respond and for providing such detailed articles on adobe dps development, it is much appreciated.
    I had completely missed that article and was struggling to find anything useful from googling!
    Dave

  • Service product replication for test and developement system

    Hi Experts,
    In our scanario service product is created in production system and later manually created in test and developement system.
    Is there is any standard function module avilable to replicate the product master data into test and developement system
    Or Is it possible to use the middleware functionallity to replicate the service product details.
    Please advice on this issue.
    Thanks,
    Senthil .R
    Edited by: Senthil Vadivelan R on Dec 17, 2007 3:46 PM

    You can use the FindFile method in the TS API:
    FindFile Method
    Syntax
    Engine.FindFile ( fileToFind, absolutePath, userCancelled, promptOption = FindFile_PromptHonorUserPreference, srchListOption = FindFile_AddDirToSrchList_Ask, isCommand = False, [currentSequenceFile])
    The function itself returns a boolean which indicates if the file exists or not. 
    Then just use a Call Executable step to run command line string to delete the file.
    Hope this helps!
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Need documentation about "Model Driven Development within SAP Netweaver"

    Hi All,
    in my dissertation there is a topic called "Model Driven Development within SAP Netweaver" and I am looking for documentation (literature) pointing on this.
    I'd prefer internet sources since I don't have time to order a book anymore.
    Thanks, Johannes

    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=modelDrivenDevelopment&cat=sdn_all
    Regards

  • Do we need Test and Development instances

    I would like to know that apart from the production instance, Test and Development 2 instances are required or only one is sufficient. If required how it will be useful.

    I depends on your change management philosophy.
    In our organization, the Development instance can differ a great deal from production in terms of setups, patch levels, etc. The Test instance is meant to be as close to production as possible in terms of setups and freshness of data. Only when patches are demonstrated to have resolved a problem in Dev are they promoted to Test, and shortly afterward to Production, as long as testing continues to be successful.
    This allows our users to train and play in the Test instance without wondering what wacky things the IS team might be doing, be cause we're doing our work primarily in Dev. ;-) In addition, if we have a problem in our production instance, we can have a high degree of confidence that we can replicate it in Test, with identical setups and data. If it is necessary to get more recent data to troubleshoot a production problem, we can quickly clone production to Test without impacting any project work underway in Dev.
    In reality, you're likely to find that you'll be lucky if you can get away with running only 3 EBS instances. :-) I'm currently managing 10 instances, but that's a little unusual for us...it's usually more like 4-5.
    Regards,
    John P.

Maybe you are looking for

  • How can I get audiobook chapters back after upgrading i Tunes and i Pad? I onlynave maprmparts of the book now.

    How can I retrieve individual chapters from an audio book after upgrading my i Pad 2. I now only jave the majormpart pf the bookmthat I had purchased via i Tunes.

  • Oracle 9i on Win ME

    Does Oracle 9i supports Win ME. If not, when will it be available . Can this be done in Win ME, to operate 9i. Open c:\windows\win.ini, search for [Compatibility95] and add the line Jrew=0x00080000 Thanks, Manish.

  • Mass deletion of customer accounts

    Hello Can I completely delete the customer records from the system using some standard tcode or program

  • Asm does not start on node2

    I am trying to build a oracle rac as a test environment at home I have three desktops a) node1 b) node2 c) openfiler I am using Jeffrey hunter's website for instructions on Oracle Rac 10g install using openfiler for iscsi node1,node2 is configured fo

  • ITunes for OS 9

    Can anyone tell me what is the newest version of iTunes that will run on OS 9.2 and where I might find it? I have an old iMac that I let my kids use and I want to put their music on it. Thanks.