http://www.perlmonks.org?node_id=929458

Shailendra has asked for the wisdom of the Perl Monks concerning the following question:

Hi all I used perl for my test suite execution in my project, but now i feel that it is tough to maintain perl code. So i decided to switch to any automation tool i.e selenium . any body please suggest me what are the advantages and disadvantages for this migration and how it will be helpful for me. Thanks Shailendra
  • Comment on Migrate from Perl to any automation tool

Replies are listed 'Best First'.
Re: Migrate from Perl to any automation tool
by davido (Cardinal) on Oct 04, 2011 at 07:28 UTC

    From http://seleniumhq.org/: "Selenium automates browsers. That's it. What you do with that power is entirely up to you."

    It could be that's exactly what you're after.

    From perl: "Over the years, Perl has grown into a general-purpose programming language. It's widely used for everything from quick "one-liners" to full-scale application development.

    It could be that's exactly what you want. ...or not.

    With flexibility and power comes the additional burden of complexity. If you find the simpler tool to provide you with all the capabilities you need, and you find that the more elaborate tool is burdensome, Perl's proponents aren't going to try to talk you out of using the tool which you find to be the better fit. The Perlish way is to grab the appropriate tool for the job.

    However, if you do find that the issue isn't entirely clear, you could incorporate both tools into your workflow. I see that there are at least 23 modules on CPAN that deal in various points of integration with Selenium. Just try http://search.cpan.org with the search term selenium. It's amazing how "on target" it seems that many of the modules look to be for someone who wants to benefit from both tools.


    Dave

      Thanks Davido for your explanation.
        Hey Davido Thats clear now. But have some query that currently I am just executing my test scripts which I wrote in Perl with the help of eclipse editor. I am executing my scripts at server side which is UNIX based machine. Then how the selenium tool is fit in this scenario. How it will helpful , If I want to run all test script with selenium tool.
Re: Migrate from Perl to any automation tool
by moritz (Cardinal) on Oct 04, 2011 at 07:50 UTC

    If you find Perl code hard to maintain, why do you think you will find code in another language or for another tool easier to maintain?

    Rewrites are often more painful than gradual improvements. Your time might be much better invested if you look for repeated code in the perl tests, and factor out the repetition into functions.

    Another question to ask is where the maintenance burden actually comes from. Is it too much repetition in the tests? or is the application changing too fast under the test suite? Or something else entirely?

    Switching tools is almost certainly a bad idea unless you know what causes the pain with the old tool, and that the new tool has some features that will ease the pain.

Re: Migrate from Perl to any automation tool
by dsheroh (Monsignor) on Oct 04, 2011 at 08:45 UTC
    now i feel that it is tough to maintain perl code.
    Stick around here for a while and learn how to write maintainable Perl?
Re: Migrate from Perl to any automation tool
by JavaFan (Canon) on Oct 04, 2011 at 08:39 UTC
    So i decided to switch to any automation tool i.e selenium . any body please suggest me what are the advantages and disadvantages for this migration and how it will be helpful for me.
    Since you've already decided to switch, why do you care about the badly motivated opinions of random people on the internet about advantages or disadvantages of switching?

    If you find that using an automation tool provides less work for you, do switch.

Re: Migrate from Perl to any automation tool
by Anonymous Monk on Oct 04, 2011 at 08:43 UTC

    So i decided to switch to any automation tool i.e selenium.

    Why? The is the opposite of the regular workflow, weigh pros and cons then choose