Skip to Content
Author's profile photo Former Member

Automated Functional Testing – Part 1 of …

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.

Assigned Tags

      10 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Gregor Wolf
      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

      Author's profile photo Gregor Wolf
      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

      Author's profile photo Former Member
      Former Member
      Hi Gregor,

      Is there something in particular you are stuck with? I will try to help you out if I can.

      Cheers,

      Justin

      Author's profile photo Gregor Wolf
      Gregor Wolf
      Hi Justin,

      I've posted the question in the Forums at Testing Enterprise Portal / CRM PC-UI with Watir.

      Regards
      Gregor

      Author's profile photo Former Member
      Former Member
      Hi Gregor,

      The link doesn't seem to be working and I can't find your forum thread using a search.

      Cheers,

      Justin

      Author's profile photo Jawahar Govindaraj
      Jawahar Govindaraj
      Good work. Waiting for your next weblog. We are using QTP for functional testing.
      Cheers
      Jawahar Govindaraj
      Author's profile photo Former Member
      Former Member
      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

      Author's profile photo Gregor Wolf
      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

      Author's profile photo Peter Inotai
      Peter Inotai
      Hi,

      Webdynpro for ABAP supports eCATT. For details check this great weblog:
      Using eCatt to Test Web Dynpro ABAP

      Best regards,
      Peter

      Author's profile photo Former Member
      Former Member
      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.