Debugging and Automated Testing

Important

This section is a work in progress.

by Joel Aufrecht
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

Debugging

PostgreSQL. You can work directly with the database to do debugging steps like looking directly at tables and testing stored procedures. Start emacs. Type M-x sql-postgres. Press enter for server name and use openacs-dev for database name. You can use C-(up arrow) and C-(down arrow) for command history.

Hint: "Parse error near *" usually means that an xql file wasn't recognized, because the tcl file is choking on the *SQL* placeholder that it falls back on.

Watching the server log. NOTE: explain how to add tcl to directly write your own log outputTo set up real-time monitoring of the Aolserver error log, type

less /usr/local/aolserver/log/openacs-dev-error.log

F to show new log entries in real time (like tail -f)
C-c to stop and F to start it up again. 
G goes to the end.
? searches backward 
/ searches forward. 
          

Manual testing

Make a list of basic tests to make sure it works

Test NumActionExpected Result
001Browse to the index page while not logged in and while one or more notes exist.No edit or delete or add links should appear.
002Browse to the index page while logged in. An Edit link should appear. Click on it. Fill out the form and click Submit.The text added in the form should be visible on the index page.

Other things to test: try to delete someone else's note. Try to delete your own note. Edit your own note. Search for a note.

Write automated tests

(Forthcoming.)

View comments on this page at openacs.org