Home
The Toolkit for Online Communities
17516 Community Members, 1 member online, 2232 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Seeking Information On Care And Feeding Of acs-automated-testing

Forum OpenACS Q&A: Seeking Information On Care And Feeding Of acs-automated-testing

Icon of envelope Request notifications

Practical howto information on acs-automated-testing seems to be non-existent. Does anybody have setup/usage/coding information to share?

Randy

Randy,
this may be an obvious thing to say, but grepping for aa_register_case in code in the package_key/tcl/test directories will teach you quite a bit about how to use acs-automated-testing. Setup consists of installing the acs-automated-testing package and mounting it. You register a test case by putting an aa_register_case statement in a -procs.tcl (or -init.tcl file) in the tcl/test directory of your package. If you have more specific questions I'll try to answer them.
Thank you, Peter. Don't hesitate to state the obvious. I have done exactly as you describe and have a simple test case defined and running. Now, it's a matter of working through several examples to become familiar with the automated testing API.

I take it that -init.tcl and -procs.tcl are handled the same as the same named files in the tcl/ directory? Where -init.tcl files are executed on startup and -procs.tcl files are simply loaded as libraries.

Randy

Randy,
you are correct. I started by following the convention of putting the tests in -init.tcl files, but Lars pointed out that keeping them in -procs.tcl files instead has the benefit of being able to watch the files (from the APM) and thus have the tests reloaded everytime you change them. The -init.tcl files should contain code to be executed only on server startup as you say.
Collapse
Posted by Khy H on
I am bit confused by the example provided by acs-automated-testing.  In the aa_example-000 case, the is a call to aa_sub to replace the aa_example_write_audit_entry body.  In the body there is reference to sequence_id variable. Is this the number of times the procedure is called?  How is this sequence_id variable used?  Thanks.