Forum OpenACS Q&A: Re: How do I speedup tclwebtest ?

Collapse
Posted by Gustaf Neumann on
The problem turned out to be a few inefficient loops with regular expressions, which seem to have at least a quadratic behavior depending on the size of the analyzed web-page. This was especially bad on assessment.

i made a couple of changes to tclwebtest, which still passes the regression test and is on its regression test more than 6 times faster on user time:

before: 4.647u 0.310s 0:05.40 91.6% 0+0k 0+0io 0pf+0w
after: 0.696u 0.230s 0:01.15 80.0% 0+0k 0+4io 0pf+0w

The new version is on a few examples from assessment more than 60 (!) times faster (wall clock time) than before. One can get the version form here:

http://media.wu-wien.ac.at/download/tclwebtest.tcl

I have sent a separate mail to tilman singer, who is the main developer of tclwebtest. hopefully, he can incoportate these changes in future versions.

Åsmund has written a very nice recorder for tclwebtest as a firefox plugin (XUL application). the recorder allows to create tclwebtest files from a user session by clicking on links and filling out forms etc. The tclwebtest files can be nicely run in threads with openacs, which is nice for regression testing (no issues with missing ad_conn infos). If there is enough interest, we might be able to make this available.

Collapse
Posted by Hamilton Chua on
Gustaf,

That is Awesome!!!

I think many would be interested in the firefox recorder, as well. A recorder will make it much easier for everyone to write tests.

Similarly, it will also make it easier for end users to participate in writing tests.

Please let us know when it will be available. I would live to to test drive it.

Ham

Collapse
Posted by Gustaf Neumann on
Åsmund has written the recorder as a byproduct of his bachelor work, since writing long tclwebtest scripts was to boring. It will need some cleanup and beautification, so it will take a little bit more time until it is released.

yesterday, we were discussion the dependency on localization. Currently, the approach will only work for one locale. There are two problem areas:

  • detecting page failure: When use site specific "pretty" return error pages (e.g. for 404 not found), the http status code will be 200 (try the error message on openacs.org)

  • dynamic links: when new items are created, it is much easier to find these depending on the link label than on the ids, which will change. In some cases, the links will be fine.

The first problem could be solved by either by changing/programming around this behavior of the aolserver (see discussions on the aolserver list) or by adding hidden fields to the return pages. Currently the recorder checks the title of the page, which works pretty well but is locale dependent. The second problem is more serious. Introducing IDs for every anchor etc. does not seem realistic.

Do the tclwebtester or selenium testers have some thoughts / best practice experiences about this?