The online community for software testing & quality assurance professionals
   
Active Topics Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Jobs
Training
News
Links
Downloads

News Group:
software.testing


Testing
Automation
Performance
Engineering
Miscellaneous
Statistics
Poll
  QA Forums
  Automated Testing
  Can Perl script be used for testing automation ?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Can Perl script be used for testing automation ?
abhra
Member

Posts: 32
Registered: May 2001

posted 10-15-2001 05:39 AM     Click Here to See the Profile for abhra   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by abhra
Can u do pragramming for automation of testcase in perl both for standalone and web based application. If anybody is doing similar activity please help me providing necessary information to start with. I have perl installed in my pc.

Thanking in advance

Abhra

------------------

IP Logged

qa_tester
Guru

Posts: 363
Registered: Aug 2001

posted 10-15-2001 06:55 AM     Click Here to See the Profile for qa_tester   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by qa_tester
I've never done it, but i've heard of some ppl have created testing tools using perl scripting. So yes u can do it, but i'm sure how.

------------------

IP Logged

bikerdude
Member

Posts: 7
Registered: Sep 2001

posted 10-15-2001 07:49 AM     Click Here to See the Profile for bikerdude   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by bikerdude
I developed a bunch of Perl code for automated testing a few years ago.

I was developing automated tests for the API of a workflow and document management product. The APIs allowed you to do such things as check in/check out documents, create active workflows, assign tasks, starts tasks, etc.

The API was in Java. Some of the developers had already written a bunch of Java test code for a lot of the APIs. My job was to continue developing additional test cases and write some type of driver program to automate the whole process.

I was new to Java programing so I decided to write the test harness(driver) frist and then concentrate on learning Java and development of new test cases. The driver had to run on Win NT and Solaris. I wanted to use a common driver for both so I decided to use to Perl. It worked great as there was minimal code that was platform specific.

If the only platform would have been Solaris I would have written a Bourne shell script as the driver. If the only platform had been Win NT I am not sure what I would have used. In retrospect I wish I had written the driver in Java but at the time that didn't seem to be an option.


------------------

Dave Draper
QA Manager
GeoTrust

IP Logged

alanark
Guru

Posts: 369
Registered: Dec 2000

posted 10-17-2001 09:18 AM     Click Here to See the Profile for alanark   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by alanark Visit alanark's Homepage!
**Camel Head passing thru**

Of course you can program a test suite via perl. I have done this for API testing, data quality verification, and even some web testing.

I guess it all comes down to what are you hoping to accomplish. What types roadmap for your tests have you ALREADY created.

Is there a toolset that might be better than trying to roll your own in perl? Are you comfortable in programming perl on your own? What are the ramifications if your test suite does not work correctly?

Some issues to think about before going down this path, but the answer is that you can certainly create a test suite written completely in perl.

IMHO, I mainly use it these days to set up data so that I can use some of the other tools in house to actually drive the tests... ie performance testing, regression testing tools that have more functionality and flexability than what I could whip up using perl and 1 month of my time. Esp since it needs to get out by tommorrow!! Oh No!

Good Luck.

------------------

IP Logged

Beowulf
Member

Posts: 34
Registered: Oct 2001

posted 10-17-2001 10:25 AM     Click Here to See the Profile for Beowulf   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by Beowulf Visit Beowulf's Homepage!
Hi there, at the company where I work we do alot of perl, and as a such we need to test it. However one really nice part about using Pearl is there are many excellent test modules avalable from CPAN. Apache::Test is one that we are currently evaluating for testing some of our web based content. Of course with the robustness of perl it is also pretty easy to write a quick and dirty test script as well. So the simple answere is Heck Yeah no problem. However if you are not a Perl developer be shure make sure that you budget development resources to produce the scripts.Oh and be sure and check out CPAN

Cheers,

Graham

------------------

IP Logged

abhra
Member

Posts: 32
Registered: May 2001

posted 10-19-2001 04:20 AM     Click Here to See the Profile for abhra   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by abhra
Thank You everybody who has provided valuable information regarding usability of perl for testing automation.

Presently I am trying to automate GUI and functionality testing of an application. For that I am trying to use win32::setuusup and win32::GUITest modules installed from CPAN.
While using those modules I have faced with some limitation. I want expert comments from those who have really used perl for GUI and functional testing automation.

1. I want to click on a particular button or menu. How perl will recognize my desired button or menu by it's properties . Function available are to recognize windows and perform all type of action on window only. But how to perform action on a particular controls of the window ?
2.Which are others modules that are usefull for GUI and Functional testing automation excepts Win32::API,Win32::GUITest
Win32::Setupsup,termReadKey etc. I have used those modules,but did not find the way to recognize a controlls.

3.All the modules mention above are applicable for Windows based application. Which are the modules usefull for the automation of non-Windows based application.

------------------

IP Logged

alanark
Guru

Posts: 369
Registered: Dec 2000

posted 10-19-2001 11:23 AM     Click Here to See the Profile for alanark   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by alanark Visit alanark's Homepage!
Ah, you want to manipulate the control inside the window... classic problem with no easy soln. Even with COTS regression tools, there is always a question on how to recognize/manipulate the controls. This typically cannot be done out of the box, as some programming is needed for this functionality.

As far as testing Non-Windows applications using perl. I'd say that it should be able to be done, but I guarantee that thw Win32::* modules are the wrong ones.

Good Luck.

------------------

IP Logged

abhra
Member

Posts: 32
Registered: May 2001

posted 10-29-2001 02:34 AM     Click Here to See the Profile for abhra   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by abhra
thank you alanark for reply
Can u please guide how to do programming for those functionality. I am already using some modules like win32::GuiTest,win32::Setupsup
and also some Windows Api function but with litle success. Can U please help me providing guideline?

Thanks

abhra

quote:
Originally posted by alanark:
Ah, you want to manipulate the control inside the window... classic problem with no easy soln. Even with COTS regression tools, there is always a question on how to recognize/manipulate the controls. This typically cannot be done out of the box, as some programming is needed for this functionality.

As far as testing Non-Windows applications using perl. I'd say that it should be able to be done, but I guarantee that thw Win32::* modules are the wrong ones.

Good Luck.


------------------

IP Logged

alanark
Guru

Posts: 369
Registered: Dec 2000

posted 10-29-2001 12:10 PM     Click Here to See the Profile for alanark   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by alanark Visit alanark's Homepage!
As far as good learning docs on programming the Win32 Libs - not many books out there, and for your specific modules, I'm not sure if any exists. Your best bet might be to try www.perl.com and try to see what you can dig up. The docs included with the lib should give you some idea on how to actually use them, but there might be some good examples of the code in use at perl.com. Even better might be activestate.com which hosts all of the Win32 specific thingies. There is a mailing list available for WIn32 users that you might want to examine as well.

www. activestate.com

Happy Hunting.

------------------

IP Logged

abhra
Member

Posts: 32
Registered: May 2001

posted 11-02-2001 03:02 AM     Click Here to See the Profile for abhra   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by abhra
Hi Alanark
Thank u for reply
Presently I am trying to do automated GUI and Functional Testing using perl

I am using perl since last sometimes. I have used various perl module for that purpose(like win32::GuiTest,win32::Setupsup,win32::Api etc....). But I didn't find solution to my problem

I have following problem :

1. How to recognize individual control of an window. Suppose I want to click on a particular control like menu,button.
2. How can I retrieve properties of a control( caption or text, item of listbox)
3. How to do event handling in perl . By Tk module u can do event handling on GUI application written in perl. But I want event handling on application that are not written in perl. Like on mouse click event I want to retrieve caption of the button or any others properties.

Recently I am trying to call Windows API from perl for a solution to above problem. But some the API is not working correctly without any apparent reason.

Now I am thinking to use C or C++ with perl. I thinnk I can use all windows API correctly in C or C++ and then I will use the module into perl. Do u think it's right approach ?

Please help me with proper guidance.

Thanking you

Abhra

------------------

IP Logged

Corey_G
Advanced

Posts: 158
Registered: Sep 2001

posted 11-05-2001 08:10 AM     Click Here to See the Profile for Corey_G   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by Corey_G
for a web based application, you may want to skip the GUI layer and test from the HTTP Protocol layer (of course this depoends on what the goals for your tool are).

for doing something like this, you can easily build web based test clients using some of the following modules:

HTTP::Request
HTTP::Cookies
LWP::UserAgent
CGI

look at CPAN and perl.com for info.

and of course if you want to get down and dirty with Perl, buy the Camel! (the O'Reilly Perl book with the camel on the cover.. AKA the bible). Also, there is an excellent book from O'Reilly, written by Clinton Wong. It is called "Web Client Programming With Perl". This is the best resource I have seen for building perl/cgi web clients. Unfortunately it is out of print, but its full contents are available on the web (do a google search).

-Corey

------------------

IP Logged

All times are PT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic | Top
Post New Topic  Post A Reply
Hop to:

Contact Us | BetaSoft Inc. | Privacy Statement

Copyright © 1997-2003 BetaSoft Inc.


Ultimate Bulletin Board 5.45c