Re: web testing

2003-09-23 Thread darren chamberlain
* Chris Devers  [2003-09-22 07:53]:
> The system was written in a mix of Bourne shell & Python code, but
> most of the elements were pretty self contained and I see no reason
> why it wouldn't have cooperated with anything written in Perl or most
> other languages.  I don't *think* I have a copy anymore, but it may be
> possible to find it somewhere on zope.org -- look for 'ftrunner' /
> 'utrunner'.

The base of the system is available as a Zope package, from
; it provides a framework,
general configuration support, and reporting harness, but doesn't
provide content verification (IIRC).  I don't think the
Boston.com-specific additions (the XPath-based content verification)
were ever rolled into the main repository.

> Around the time I was working on this, there was a talk at Boston.pm
> about WWW::Mechanize, which seemed very complimentary to these tools.
> That might be something worth looking into.

The XPath-based verification is a very cool (IMHO) and useful idea that
could be trivially attached to many web-based testing schemes.  The
basic idea was simple:  A specific XPath expression should return
specific data.  If all your elements have classes or ids, then this
method is highly resistent to things like layout changes.

For example, when testing the rendering of a web page for a news
article,

  //[EMAIL PROTECTED]'story']/[EMAIL PROTECTED]'mainHead']/text()

should contain the main headline of a story in the returned HTML; the
layout can (and does) get tweaked without affecting the success of this
test.

Some day I'll turn this into a CPAN module (when I have the time).

(darren)

-- 
All things are possible, except for skiing through a revolving door.


pgp0.pgp
Description: PGP signature


Re: web testing

2003-09-16 Thread Philippe 'BooK' Bruhat
Le mardi 16 septembre 2003 à 20:42, Philippe 'BooK' Bruhat écrivait:
> Le mardi 16 septembre 2003 à 09:25, Andy Lester écrivait:
> > >This sounds like something you could do with BoOK's HTTP::Proxy module.
> > >
> > 
> > Linda Lee Julien has written HTTP::Recorder that goes thru 
> > HTTP::Proxy to keep track of you actions, and then generates 
> > WWW::Mechanize scripts for you.
> 
> Wow! That's exactly what I wanted to do with HTTP:Proxy when I started
> the project. :-)

The very intersting part being that she didn't use any filter.
She's actually using a modified agent to be used by the proxy.
Very clever. The HTTP::Recorder agent can probably be used in
other ways.

I predict that HTTP::Recorder will work well with further versions of
HTTP::Proxy. :-)

-- 
 Philippe "BooK" Bruhat

 When you create a climate of peace, you have only fair weather.
 But where the climate is one of violence, it can only rain blood.
   (Moral from Groo The Wanderer #120 (Epic))



Re: web testing

2003-09-16 Thread Philippe 'BooK' Bruhat
Le mardi 16 septembre 2003 à 09:25, Andy Lester écrivait:
> >This sounds like something you could do with BoOK's HTTP::Proxy module.
> >
> 
> Linda Lee Julien has written HTTP::Recorder that goes thru 
> HTTP::Proxy to keep track of you actions, and then generates 
> WWW::Mechanize scripts for you.

Wow! That's exactly what I wanted to do with HTTP:Proxy when I started
the project. :-)

HTTP::Recorder might encounter a few problems when HTTP::Proxy 0.10
is out, since the filter API (and the push_filter() method) will change
a lot. I think I've found a better and more flexible API, and will stick
with it for a while.

http://http-proxy.mongueurs.net/ is the home of the module.

For those who want to try out the proxy and what it can do, reconfigure
your browsers to use home.bruhat.net port 8080 as a proxy.

UGGC::Cebkl ehyrf! ;-)

-- 
 Philippe "BooK" Bruhat

 For every winner, there must be one or more losers.
(Moral to the Sage story in Groo #111 (Epic))



Re: web testing

2003-09-16 Thread Chris Devers
On Tue, 16 Sep 2003, Michael Stevens wrote:

> On Tue, Sep 16, 2003 at 11:57:42AM +0100, Paul Makepeace wrote:
> > The proxy neatly (IMO) got around the problem of rewriting URLs,
> > cookies, and JavaScript. I thought quite hard about this and couldn't
> > see a non-proxy way of doing it. (Bueller?)
> >
> > Is that the sort of thing you're talking about? Are you looking for
> > an online service or tarball? I'm heading toward implementing the
> > former route.
>
> Yeah, that's the sort of thing. Prefer a a piece of software I can
> install. I've used expensive commercial windows stuff which will do this
> by automating IE, which I'd rather avoid.

I was doing something similar to this for Zope testing a few months ago.
It was the same basic idea: run a little proxy daemon, then point your
browser[s] at it. For each request, it would generate a .in & a .out file
with the contents of the HTTP request & response. Then there was another
tool that could play back those input & output files looking for relevant
patterns in the data stream.

One insight that the programmer I was working with had was to use XPath to
aid in parsing the responses.  It was more robust than regex matching, but
slightly less complex than parsing out everything by hand; basically, it
allowed us to say "there's going to be a string wrapped in a  tag,
and the  tag will be nested under , , and .  If
that last one is nested in anything else, we don't care."

In most cases, this was good enough to zoom on exactly on what was needed.


The system was written in a mix of Bourne shell & Python code, but most of
the elements were pretty self contained and I see no reason why it
wouldn't have cooperated with anything written in Perl or most other
languages.  I don't *think* I have a copy anymore, but it may be possible
to find it somewhere on zope.org -- look for 'ftrunner' / 'utrunner'.


Around the time I was working on this, there was a talk at Boston.pm about
WWW::Mechanize, which seemed very complimentary to these tools. That might
be something worth looking into.

I think the proxy is the important bit though: if you can get that to
work, and it can record all the data in a useful format, then you can use
whatever tools you like to analyze the results.



-- 
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/

np: 'Ma Muse M´amuse'
 by Rabih Abou-Khalil
 from 'The Cactus Of Knowledge'



Re: web testing

2003-09-16 Thread Andy Lester
This sounds like something you could do with BoOK's HTTP::Proxy module.

Linda Lee Julien has written HTTP::Recorder that goes thru 
HTTP::Proxy to keep track of you actions, and then generates 
WWW::Mechanize scripts for you.

xoa

--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance


Re: web testing

2003-09-16 Thread David Landgren
Paul Makepeace wrote:

Je 2003-09-16 11:32:44 +0100, Michael Stevens skribis:

Can anyone recommend any good software for automated testing of
websites? I'm hoping for something fairly simple that will record usage
of a website in a web-browser, and then can re-run that later and look
for inconsistencies.


I wrote something like this a couple of years ago. You would set the
browser to proxy through a piece of software that recorded cookies &
HTTP requests and then later replay then with a frames interface. At
each page you could then assign regexes/md5 tests to check that
consistency.
This sounds like something you could do with BoOK's HTTP::Proxy module.

David




Re: web testing

2003-09-16 Thread Paul Makepeace
Je 2003-09-16 11:32:44 +0100, Michael Stevens skribis:
> Can anyone recommend any good software for automated testing of
> websites? I'm hoping for something fairly simple that will record usage
> of a website in a web-browser, and then can re-run that later and look
> for inconsistencies.

I wrote something like this a couple of years ago. You would set the
browser to proxy through a piece of software that recorded cookies &
HTTP requests and then later replay then with a frames interface. At
each page you could then assign regexes/md5 tests to check that
consistency.

The proxy neatly (IMO) got around the problem of rewriting URLs,
cookies, and JavaScript. I thought quite hard about this and couldn't
see a non-proxy way of doing it. (Bueller?)

Is that the sort of thing you're talking about? Are you looking for
an online service or tarball? I'm heading toward implementing the
former route.

Cheers, Paul

-- 
Paul Makepeace ... http://paulm.com/

"What is a true division of labor? It can only be street-cleaning."
   -- http://paulm.com/toys/surrealism/