By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,660 Members | 1,102 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,660 IT Pros & Developers. It's quick & easy.

Web testing framework?

P: n/a

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
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Robb Shecter wrote:
Anybody know about a Python library for testing websites?


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

Jul 18 '05 #2

P: n/a
On Mon, 2004-05-17 at 20:23, Robb Shecter wrote:
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.


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: ma**@pollenation.net

Any views expressed are my own and do not necessarily reflect
the views of my employer.
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.