19 June 2005

tcpwatch selenium

Record a session (e.g. fill a form), tcpwatch and create a suite for functional test, selenium.

How I do functional test for my web application? (based on Starting with Selenium, by ian)

1. Open firefox, Edit>Preferences>Connection Settings
Choose Manual proxy configuration.
HTTP Proxy: localhost Port: 8888

2. Create a folder, record and run command:
tcpwatch.py -s -r record -p 8888

Note: assume tcpwatch.py in os environment path.
url: http://blog.ianbicking.org/starting-with-selenium.html?version=2

3. In firefox, open http://localhost/~helmi/test/main.php
Fill in one of the input box, then click button Carian.

4. Stop tcpwatch.py at command line, i.e. Ctrl+c.

5. Create TestScript.html for selenium by:
./tcpwatch_scriptgen.py -r record selenium > TestScript.html

6. Modify link, element locator appropriately.
e.g. adodb_search_field `rename to` document.name_srh.adodb_search_field

hint: FreeBSD
root > cd /usr/ports
root > make search name=tcpwatch
root > make search name=clientform
Post a Comment