Web testing framework?

R

Robb Shecter

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
 
R

richard

Robb said:
Anybody know about a Python library for testing websites?

http://www.python.org/pypi?:action=display&name=webunit&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
 
M

Matt Goodall

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: (e-mail address removed)

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,197
Messages
2,571,041
Members
47,643
Latest member
ashutoshjha_1101

Latest Threads

Top