Forum OpenACS Development: acs-automated-testing requires watching?!

Collapse
Posted by tammy m on
Hi

I know I'm doing this wrong but I can't see how! I have created a my-package/tcl/test dir and created my-procs.tcl files in the directory containing test cases.

My problem is that I don't see my package or any of its test cases listed in the Automated Test Administration pages. I have to set a "watch" for my-procs.tcl file in the APM first. Then my package and its test cases become visible in the Automated Test Admin pages.

There must be something really obvious I'm missing... I'm getting tired of watching the files... someone embarrass me please!

tia

Collapse
Posted by Tilmann Singer on
Unfortunately they require to be watched to appear in acs-automated-testing, yes. This is propably a consequence of having them in tcl/, not sure if it is optimal this way.

Or are you saying that they never appear even though you selected the package to be watched?

Collapse
Posted by tammy m on
They do appear though I select a file to be watched. How do I select a "package?" Does this make all files in my test dir appear? That would be a bit better at least:)
Collapse
Posted by Tilmann Singer on
In /acs-admin/apm -> 'watch all files' next to the desired package. As far as I remember this will recognize added files as well.
Collapse
Posted by tammy m on
Hmm. Maybe this is in a later version than 4.6.1, cuz I don't see it on my APM page:(
Collapse
Posted by Randy O'Meara on
Tammy,

A quick trick to get your package files watched automatically (even after service restart) while you're developing. Put this in your *-init.tcl file in your <package_key>/tcl directory.

apm_watch_all_files <package_key>

OR

foreach package_key $package_key_list {
    apm_watch_all_files $package_key
}

Randy

P.S. Peter gets credit for pointing this out to me.

Collapse
Posted by tammy m on
Ooh,

Very sneaky. I love it. Thanks Randy.