Blogs

Gregor Wolf

Automate Web Application Testing with Selenium for ABAP
Gregor Wolf Active Contributor Gold: 1,500-2,499 points SAP Mentor
Business Card
Company: Siteco Beleuchtungstechnik GmbH
Posted on Oct. 27, 2009 07:48 AM in ABAP, CRM, Open Source, SAP Solution Manager, Web Dynpro

Subscribe.Subscribe
Print. Print
Permalink Permalink
Share

Update: You find the current version of the SeleniumABAP Project at SAP Code Exchange.

Unfortunately I've caught a bad cold and I have to stay in bed exactly to the time I want to travel the Cluetrain to Vienna. Also today, which is the night of the SAP TechEd 2009 Demo Jam, I was not well enough to travel to Vienna. So I had to call Craig Cmehil this morning and canceled my attendance. But as already planned I release the source code of my project to the public. 

Demo Videos

To get an insight of what Selenium and Selenium for ABAP can do for you, please watch this Videos:

Source

The first thing what you need to record tests is Selenium IDE which comes as a Firefox plugin. If you're not running Firefox get it here.

To convert the recorded test in Selenium IDE to a ABAP Unit test class you need abap-rc.js which is a JavaScript file that can be imported into Selenium IDE by navigating to Options - Options ... - Formats in the Selenium IDE Menu. There you can click on the Add button, provide a name for the new format where I would suggest "ABAP Selenium RC" and then paste the code into the box below.

To run the generated ABAP Unit test you have to install the SAPLink Nugget ZSELENIUMABAP.nugg.zip. It provides the Selenium RC ABAP Client Driver class and also the XSL Transformations to create this class from the iedoc.xml which is the Selenium API definition.

I need your support

This is the current status of this project. What I would like to add is a possibility to generate eCATT tests in Selenium IDE and import them as an eCATT test script. If you know a way how to do that please contact me.

Gregor Wolf  Active Contributor Gold: 1,500-2,499 points SAP Mentor is an Enterprise Architect for Siteco Beleuchtungstechnik GmbH and owner of Computerservice Wolf.


Comment on this articleCan my project be useful for your work? Please tell me your thoughts.
Comment on this weblog
Showing messages 1 through 10 of 10.

Titles Only Main Topics Oldest First

  • Great!
    2009-10-28 18:55:31 Alejandro Bindi Business Card [Reply]

    I watched the 5 min video, this looks very promising! I hope to find some time to try this myself, have you tried it with any Web Dynpro ABAP application yet?
    Regards
    • Great!
      2009-10-29 01:00:39 Peter Inotai Business Card [Reply]

      For WebDynproABAP you can use eCATT as it was mentioned Thomas Jung's blog:
      https://weblogs.sdn.sap.com/pub/wlg/3368
      Regards,
      Peter
  • Great!
    2009-10-28 18:49:38 Alejandro Bindi Business Card [Reply]

    I watched the 5 min video, this looks very promising! I hope to find some time to try this myself, have you tried it with any Web Dynpro ABAP application yet?
    Regards
  • Automated tests frameworks
    2009-10-28 05:37:42 Björn Harmen Gerth Business Card [Reply]

    Hello Gregor,


    have you also spent some time to research on other test frameworks (and whether it is possible to use them with ABAP), like FitNesse or GreenPepper?


    Cheers,
    Björn

  • It sounds interesting
    2009-10-28 01:02:52 Peter Inotai Business Card [Reply]

    Hi Wolf,
    ABAP part sounds interesting.
    What is the required basis release for this tool? Basis 6.40?
    Thanks,
    Peter
    • It sounds interesting
      2009-10-28 04:36:47 Gregor Wolf Business Card [Reply]

      Hi Peter,


      I've developed the ABAP Part on a 7.00 System. When installed the SAPLink into one of my 6.40 Systems I found that the Data Types I've used in the GET_BOOLEAN_ARRAY and GET_NUMBER_ARRAY did not exist there. I will update the SAPLink file ASAP.


      Another problem you can run into is the missing regular expression support in 6.40. Regular expressions are used in Selenium to check if a text is present on a page.


      Best regards
      Gregor

      • It sounds interesting
        2009-10-28 05:33:52 Peter Inotai Business Card [Reply]

        Hi Gregor,
        Thanks for checking it.
        I thought of 6.40 because of the ABAP Unit framework, I was not aware of the regular expression part. That one definitely needs 7.00.
        Best regards,
        Peter
  • This will really help me :-)
    2009-10-27 11:03:31 Carsten Kasper Business Card [Reply]

    Hi Gregor,


    the video is very promising! I am going to give this tool a try once I finish development and get some time to test all the stuff.


    I knew you could connect ABAP to a webserver, but I did not know however that you can control firefox this way. This poses a complete new idea in my mind.


    cheers Carsten

    • This will really help me :-)
      2009-10-28 04:40:46 Gregor Wolf Business Card [Reply]

      Hi Carsten,


      great to hear that it could be useful for you. Hope you find the time to check it out. All the best will your current development.


      Best regards
      Gregor

  • just checked
    2009-10-27 09:06:51 Marilyn Pratt SAP Employee Business Card [Reply]

    this has a precedence, done for webdynpro java in NWDS according to internal sources. Embedded in ecatt

Showing messages 1 through 10 of 10.