Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Automated testing of cgi / perl

Reply
Thread Tools

Automated testing of cgi / perl

 
 
spam@comjet.com
Guest
Posts: n/a
 
      02-15-2007
Hello, I have the following situation:

- Existing site with about 18,000 cgi pages.
- Most pages are data driven (fill out form, submit, get results).
Exact results may change from day to day as data get updated.
- Some static html mixed in
- Many pages require authentication. It is a custom in-house
authentication mechanism, but ultimately it stores a temporary session
ID in a session cookie.

I would like to implement automated testing that will:

- Tell me if anything breaks.
- Tell me if a new installation of the same overall site is working
the same as the original (for an upgrade project).
- Tell me if I break anything during maintenance (regression testing)

Can anyone give me some pointers on this? Tool? Overall approach?
Pitfalls? Any clues appreciated.

Larry

 
Reply With Quote
 
 
 
 
Michael Vilain
Guest
Posts: n/a
 
      02-16-2007
In article <(E-Mail Removed) .com>,
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Hello, I have the following situation:
>
> - Existing site with about 18,000 cgi pages.
> - Most pages are data driven (fill out form, submit, get results).
> Exact results may change from day to day as data get updated.
> - Some static html mixed in
> - Many pages require authentication. It is a custom in-house
> authentication mechanism, but ultimately it stores a temporary session
> ID in a session cookie.
>
> I would like to implement automated testing that will:
>
> - Tell me if anything breaks.
> - Tell me if a new installation of the same overall site is working
> the same as the original (for an upgrade project).
> - Tell me if I break anything during maintenance (regression testing)
>
> Can anyone give me some pointers on this? Tool? Overall approach?
> Pitfalls? Any clues appreciated.
>
> Larry


I don't know of any tools that can test in a web application
environment. The regression testing tool in Unix is expect which is
command-line only.

With so many pages, there must be an automated test plan. Otherwise,
how did the site get so large without detecting and fixing bugs? Or was
that what your customers are for?

You can write perl code that uses HTML CPAN libraries to access pages,
pretending to be a client. Said connection can input information into
fields, even store cookies for session ID between pages.

If you don't already have an automated testing environment for your web
application, it's rather late to start developing one.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



 
Reply With Quote
 
 
 
 
Mark Clements
Guest
Posts: n/a
 
      02-16-2007
Michael Vilain wrote:
> In article <(E-Mail Removed) .com>,
> (E-Mail Removed) wrote:
>
>> Hello, I have the following situation:
>>
>> - Existing site with about 18,000 cgi pages.
>> - Most pages are data driven (fill out form, submit, get results).
>> Exact results may change from day to day as data get updated.
>> - Some static html mixed in
>> - Many pages require authentication. It is a custom in-house
>> authentication mechanism, but ultimately it stores a temporary session
>> ID in a session cookie.
>>
>> I would like to implement automated testing that will:
>>
>> - Tell me if anything breaks.
>> - Tell me if a new installation of the same overall site is working
>> the same as the original (for an upgrade project).
>> - Tell me if I break anything during maintenance (regression testing)
>>
>> Can anyone give me some pointers on this? Tool? Overall approach?
>> Pitfalls? Any clues appreciated.
>>
>> Larry

>
> I don't know of any tools that can test in a web application
> environment. The regression testing tool in Unix is expect which is
> command-line only.

I came across Selenium today, which looks rather useful, and has the
advantage of being able to run tests under various browsers. Also worthy
of note is jsunit.

>
> With so many pages, there must be an automated test plan. Otherwise,
> how did the site get so large without detecting and fixing bugs? Or was
> that what your customers are for?
>
> You can write perl code that uses HTML CPAN libraries to access pages,
> pretending to be a client. Said connection can input information into
> fields, even store cookies for session ID between pages.

As an addendum to this:

Test::WWW::Mechanize

would be my first port of call.

>
> If you don't already have an automated testing environment for your web
> application, it's rather late to start developing one.

He's probably inherited a large and rather crufty application and wants
to make sure nothing breaks as he tries to knock it into shape. Best of
luck

Mark
 
Reply With Quote
 
spam@comjet.com
Guest
Posts: n/a
 
      02-17-2007
> I came across Selenium today, which looks rather useful, and has the
> advantage of being able to run tests under various browsers. Also worthy
> of note is jsunit.
>
>
>
> > With so many pages, there must be an automated test plan. Otherwise,
> > how did the site get so large without detecting and fixing bugs? Or was
> > that what your customers are for?

>
> > You can write perl code that uses HTML CPAN libraries to access pages,
> > pretending to be a client. Said connection can input information into
> > fields, even store cookies for session ID between pages.

>
> As an addendum to this:
>
> Test::WWW::Mechanize
>
> would be my first port of call.
>
>
>
> > If you don't already have an automated testing environment for your web
> > application, it's rather late to start developing one.

>
> He's probably inherited a large and rather crufty application and wants
> to make sure nothing breaks as he tries to knock it into shape. Best of
> luck


Thanks for the tips! I had seen a couple of these tools around, but
wasn't sure where to start. And yes, you're right, I didn't create
18,000 pages without a test plan. That was someone else.

Larry

 
Reply With Quote
 
Larry
Guest
Posts: n/a
 
      02-18-2007
> Thanks for the tips! I had seen a couple of these tools around, but
> wasn't sure where to start. And yes, you're right, I didn't create
> 18,000 pages without a test plan. That was someone else.
>
> Larry- Hide quoted text -
>
> - Show quoted text -


First impressions of Selenium:

WOW
Small download
1-click install
Up and running immediately
Explanation of command syntax right in the main window
First test worked perfectly
Translates tests into perl, java, ruby automatically

This looks really great, especially that I can create my tests right
in the browser, then translate to perl or ruby for automation and fine-
tuning.

Hats off to the Selenium developers!

Larry

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what's wrong calling a Perl/CGI script in Perl/CGI script under Tomcat server? kath Perl Misc 4 04-09-2007 09:21 PM
looking for automated testing library like HttpUnit Quixote Java 2 11-09-2005 09:53 PM
Automated testing of database queries? Rhino Java 0 03-12-2005 02:17 PM
Automated testing on web applications Tim Smith Java 0 02-20-2004 05:32 AM
Automated Testing software Alvin Bruney ASP .Net 1 11-20-2003 07:35 PM



Advertisments