Skip to Content
I’m going to be writing a series of posts on the automated Functional Testing system we have setup against our SAP Portal. I’m not sure how many posts it’s going to take, we’ll find out as we go. Here is the first an introduction. OUR TEST PROCESSEvery time we fix a bug or add a new feature we write a test or series of tests which prove the fix/feature is working. Now we’re not being forced to do this testing by some big bad manager so why do we do it? Are we mad? Do we like writing lots of extra code which doesn’t add new features or fix bugs?  NO. This testing believe it or not has lots of benefits for us as developers:  • Confidence – As the number of tests build up over time we know the new fix/feature has not just broke something we fixed last week. • Time – No more having to open up the browser and click through a series of boring time consuming steps to prove the latest fix is working. The automated testing does the donkey work for us. • Fun – Ok we are a little mad! But there is some (maybe perverse) pleasure in watching lots of tests run and getting no failures. Knowing if we had to test manually it would take all day and we’d likely miss or skip something which would later come back to bite us. HOW DID WE END UP HERE?We are a small team which took over development/maintenance of an external SAP portal application. The original developers were contractors who had long gone. It was a scary prospect fixing code and not knowing if the “fix” had managed to break some other part of the application.  It meant after making even the smallest change lots of manual testing was needed. Now it goes without saying this was not fun, not fun at all. There had to be a better solution… A BETTER SOLUTIONWe started looking around the web and read lots of good things about a free (yes free) tool called Watir (pronounced water). It allows you to automate Internet Explorer using the scripting language Ruby. I thought it would be pretty cool if we could use this tool to test our SAP Portal Application.  After lots of trail and error I managed to connect to the portal, login and run a test! Now after six months of bug fixes and new features we run hundreds of tests before each release of the application. COMING UP IN PART TWOIn the next post I’ll explain how we setup the environment, no more talk just lots of practical downloading and installation.  NOTE: Anyone with test driven development knowledge will rightly say we should be doing this sort of thing at a unit test level first. I agree and fully intend to do this but as yet I’ve not managed to get the Unit Test framework of the SAP Portal working.
To report this post you need to login first.

10 Comments

You must be Logged on to comment or reply to a post.

  1. Gregor Wolf
    Hello Justin,

    I think that is just what we need. We are starting to implement a SAP integrated Typo3 CMS Extention. I’m looking forward for your next Blog’s.

    Regards
    Gregor

    (0) 
    1. Gregor Wolf
      Hello Justin,

      I’ve tried out Watir and it had rearly blowed my mind. So quick and easy to write a full test. Today I’ve tried with the Enterprise Portal running SAP CRM. But here I’ve stucked into problems. Hope you will continue soon.

      Regards
      Gregor

      (0) 
  2. Matthias Preisser
    Hi,

    We are looking at using Ecatt for automated testing for Web Dynpro. Have you also looked at Ecatt vs. watir and what was the reason for picking watir?

    Thanks,

    Matthias

    (0) 
    1. Gregor Wolf
      Hello Matthias,

      the problem is that ECatt does only support WebDynpro testing. No BSP and Portal testing is possible with ECatt. Also Watir is free and rearly easy to use.

      Regards
      Gregor

      (0) 
    2. Justin Ramel Post author
      I’ve not looked at Ecatt so can’t really comment. I can tell you why I chose Watir though. It’s free, easy to use and will work against any system not just the SAP portal. I setup this testing with no budget and in a very short time. It took me about a day from discovering Watir to writing a working test against the portal.

      Watir is basically a scripting language for Internet Explorer so anything a user can do in a browser I can simulate with a test script. The Watir team have done a very good job of simplifying the domain so writing test scripts is extremely easy.

      I’m not saying it’s perfect but for free I’m certainly not complaining.

      (0) 

Leave a Reply