Connecting Tech Pros Worldwide Forums | Help | Site Map

Web testing framework?

Robb Shecter
Guest
 
Posts: n/a
#1: Jul 18 '05

Anybody know about a Python library for testing websites? I'm
thinking of something like a scriptable browser, where you could tell
it to browse to a certain URL, check for the existence of certain text
in a page, follow a certain link, etc.

I've begun writing my own (because it's so easy to do in Python), but
wondering if there's anything out there like this.

Thanks!
Robb

richard
Guest
 
Posts: n/a
#2: Jul 18 '05

re: Web testing framework?


Robb Shecter wrote:[color=blue]
> Anybody know about a Python library for testing websites?[/color]

http://www.python.org/pypi?:action=d...&version=1.3.8

'''
Webunit is a framework for unit testing websites:

- Browser-like page fetching including fetching the images and stylesheets
needed for a page and following redirects
- Cookies stored and trackable (all automatically handled)
- HTTP, HTTPS, GET, POST, basic auth all handled, control over expected
status codes, ...
- DOM parsing of pages to retrieve and analyse structure, including simple
form re-posting
- Two-line page-fetch followed by form-submit possible, with error checking
- Ability to register error page content across multiple tests
- Uses python's standard unittest module as the underlying framework
- May also be used to regression-test sites, or ensure their ongoing
operation once in production (testing login processes work, etc.)
'''


Richard

Matt Goodall
Guest
 
Posts: n/a
#3: Jul 18 '05

re: Web testing framework?


On Mon, 2004-05-17 at 20:23, Robb Shecter wrote:[color=blue]
> Anybody know about a Python library for testing websites? I'm
> thinking of something like a scriptable browser, where you could tell
> it to browse to a certain URL, check for the existence of certain text
> in a page, follow a certain link, etc.[/color]

You should look at Python Browsing Probe, <http://pbp.berlios.de/>. It's
a fairly new project but it sounds like it already does exactly what you
want, and more. From the website:

"PBP is a web test tool based on John J. Lee's mechanize. It
exposes the browser functionality at the level of a shell-like
interpreter so that testers can quickly write tests in a simple
language designed specifically for that purpose. Anyone familiar
with a command line should be able to write test scripts for
even the most complex web applications with PBP."


Cheers, Matt

--
Matt Goodall, Pollenation Internet Ltd
w: http://www.pollenation.net
e: matt@pollenation.net

Any views expressed are my own and do not necessarily reflect
the views of my employer.


Closed Thread