Forum OpenACS Q&A: Re: Assertions in OpenACS

Collapse
7: Re: Assertions in OpenACS (response to 1)
Posted by Peter Marklund on
Kolja,
I think it's great that you are getting involved in tclwebtest testing! Here are some tips from my experience so far:

1) Make sure you have the latest tclwebtest sources from CVS as a number of bug fixes and improvements have been made. We are continually working on improving tclwebtest and everybody in the OpenACS community is invited to participate in this.

2) Please see if your tests can fit in with the suite of tclwebtest tests that you can find in openacs-4/etc/install/*.test and use the support API that I have developed in opeancs-4/etc/install/tcl/*.tcl. The most extensive test suite so far is in openacs-4/etc/install/dotlrn-demo-data-setup.test.

3) The acs-automated-testing package has assertion methods such as aa_equals, aa_true, and aa_false. For a good example for how to write Tcl API tests, see the test cases in the file in the directory openacs-4/packages/acs-authentication/tcl/test. We now have convenient support for rollbacks in our tests and we've already seen a lot of benefit from the Tcl API tests that we have written. So far our tclwebtest tests have been running outside OpenACS. However, once we have AOLserver 4 the plan is to make tclwebtest execute from withing OpenACS and integrate it with the acs-automated-testing package. That way we can achieve the goal of having one canonical page to go to in OpenACS for the test status of the system.

4) I have developed a crawler that can visit all links under a certain URL. Take a look at openacs-4/etc/install/crawl-links.test.

Let me know if you need commit rights for any of the software mentioned above.