Index: openacs-4/packages/acs-automated-testing/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/doc/index.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-automated-testing/www/doc/index.html 11 Dec 2003 21:39:46 -0000 1.2 +++ openacs-4/packages/acs-automated-testing/www/doc/index.html 18 Jan 2004 15:04:27 -0000 1.3 @@ -1,10 +1 @@ - - -ACS Automated Testing - - - -See /doc/tutorial-debug.html. - - - +Automated Testing

Automated Testing


Table of Contents

Installation
Requirements
View comments on this page at openacs.org
Index: openacs-4/packages/acs-automated-testing/www/doc/install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/doc/install.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-automated-testing/www/doc/install.html 18 Jan 2004 15:04:27 -0000 1.1 @@ -0,0 +1,7 @@ +Installation

Installation

+ by Joel Aufrecht +


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

Automated Testing is part of acs-core, and therefore should already be installed in any OpenACS system. Individual automated tests are stored within each package in package/tcl/test. +

View comments on this page at openacs.org
Index: openacs-4/packages/acs-automated-testing/www/doc/requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/doc/requirements.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-automated-testing/www/doc/requirements.html 18 Jan 2004 15:04:27 -0000 1.1 @@ -0,0 +1,25 @@ +Requirements

Requirements

by Joel Aufrecht


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

Introduction

Automated Testing provides a framework for executing tests of all varieties and for storing and viewing the results.

Functional Requirements

Req #Status in 5.0Priority for 5.1 (A=required, B=optional)Description
1DoneDoneExecute TCL tests. Execute a sequence of TCL code is executed and determine the correctness of the results.
1.1partialAExecute HTTP tests. Execute tests that can interact with a the webserver via the external, HTTP interface, including retrieving pages, following links, and submitting forms. (This is partially done in the sense that we can make http calls from tcl api, but there is no framework for doing anything complicated.)
1.1.1AExecute tclwebtest scripts. A test can contain tclwebtest commands. If tclwebtest is not installed, those commands fail gracefully.
1.1.1.1partialAtclwebtest is easy to install. Tclwebtest installation is fully documented and can be installed with less than five steps. (Install is documented in 5.0, but there's a can't-find-config error; also, some new work in tclwebtest HEAD needs to packaged in a new tarball release.)
2ATests have categories. Individual tests can be marked as belonging to zero, one, or many of these categories. The UI provides for running only tests in selected categories, and for viewing only results of tests in selected categories. +
Testing Mode
+  Regression
+  Smoke
+  Stress
+  Default-Only (for tests, such as front page UI tests, that will break 
+                once the default site is modified and can be ignored on 
+                non-default sites)
+Layer
+  Web Page
+  TCL Page Contract
+  TCL API
+  SQL  
+Severity (derives from ns_log values)
+  Notice (use this for informational items that do not imply a problem)
+  Warning (use this for submitted tests w/o fixes; hygiene tests such as deprecated function sweeps)
+  Error (default severity)
+  Test Validity Bug (use this for problems that suggest the test itself in invalid or broken)
+Test Data
+  Self-contained  Requires no test data, leaves no test data.
+  Populate  Generates and leaves test data, for other tests or for end users.
3BTests can be ordered lists of other tests. minimal: verify that a test proc can call other test procs. Better: A test can be created within the GUI by selecting other tests. This test is stored in the database and can be exported. (This is related to a bigger issue of storing test scripts in some format other than tcl procs.)
4BTest scripts can be imported and exported. It should be possible to import a test into the database from a file, and to export it to a file. These files should be sharable by different OpenACS installations. It should be possible to import/export directly between running OpenACS sites. (We should look at what did and didn't work in acs-lang catalog files and work from there.)
5BMacro Recording. End users can create and run tests from the web interface without writing code. +

1) UI to turn on macro mode.

2) basic recording: when you fill out a form while macro mode is on, the submit is caught and displayed as tclwebtest code, and then executed.

3) UI for creating aa_true tests automatically, based on the content of the page. (For example, a form that says "the returned page must contain [ type regexp here] that spits out aa_true "test X" [string regexp blah blah]

References

Revision History

Document Revision #Action Taken, NotesWhen?By Whom?
1Creation17 Jan 2004Joel Aufrecht
View comments on this page at openacs.org
Index: openacs-4/packages/acs-automated-testing/www/doc/xml/Makefile =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/doc/xml/Makefile,v diff -u -r1.1 -r1.2 Binary files differ Index: openacs-4/packages/acs-automated-testing/www/doc/xml/index.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/doc/xml/index.xml,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-automated-testing/www/doc/xml/index.xml 17 Jan 2004 13:46:27 -0000 1.1 +++ openacs-4/packages/acs-automated-testing/www/doc/xml/index.xml 18 Jan 2004 15:04:27 -0000 1.2 @@ -1,14 +1,14 @@ - - +
Automated Testing - + Section Missing - + Section Missing - +
Index: openacs-4/packages/acs-automated-testing/www/doc/xml/requirements.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/doc/xml/requirements.xml,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-automated-testing/www/doc/xml/requirements.xml 17 Jan 2004 13:46:27 -0000 1.1 +++ openacs-4/packages/acs-automated-testing/www/doc/xml/requirements.xml 18 Jan 2004 15:04:27 -0000 1.2 @@ -21,35 +21,99 @@ Req # - Priority Status in 5.0 + Priority for 5.1 (A=required, B=optional) Description - 10.0 + 1 + Done + Done + Execute TCL tests. Execute a sequence of TCL code is executed and determine the correctness of the results. + + + 1.1 + partial A - ? - Seamless - Viewing. The gatekeeper should provide seamless viewing of URLs. This means - that the URLs should look like they belong to the ACS site, not the - original site. + Execute HTTP tests. Execute tests that can interact with a the webserver via the external, HTTP interface, including retrieving pages, following links, and submitting forms. (This is partially done in the sense that we can make http calls from tcl api, but there is no framework for doing anything complicated.) + + 1.1.1 + + A + Execute tclwebtest scripts. A test can contain tclwebtest commands. If tclwebtest is not installed, those commands fail gracefully. + + + 1.1.1.1 + partial + A + tclwebtest is easy to install. Tclwebtest installation is fully documented and can be installed with less than five steps. (Install is documented in 5.0, but there's a can't-find-config error; also, some new work in tclwebtest HEAD needs to packaged in a new tarball release.) + + + + 2 + + A + Tests have categories. Individual tests can be marked as belonging to zero, one, or many of these categories. The UI provides for running only tests in selected categories, and for viewing only results of tests in selected categories. +Testing Mode + Regression + Smoke + Stress + Default-Only (for tests, such as front page UI tests, that will break + once the default site is modified and can be ignored on + non-default sites) +Layer + Web Page + TCL Page Contract + TCL API + SQL +Severity (derives from ns_log values) + Notice (use this for informational items that do not imply a problem) + Warning (use this for submitted tests w/o fixes; hygiene tests such as deprecated function sweeps) + Error (default severity) + Test Validity Bug (use this for problems that suggest the test itself in invalid or broken) +Test Data + Self-contained Requires no test data, leaves no test data. + Populate Generates and leaves test data, for other tests or for end users. + + + + 3 + + B + Tests can be ordered lists of other tests. minimal: verify that a test proc can call other test procs. Better: A test can be created within the GUI by selecting other tests. This test is stored in the database and can be exported. (This is related to a bigger issue of storing test scripts in some format other than tcl procs.) + + + + 4 + + B + Test scripts can be imported and exported. It should be possible to import a test into the database from a file, and to export it to a file. These files should be sharable by different OpenACS installations. It should be possible to import/export directly between running OpenACS sites. (We should look at what did and didn't work in acs-lang catalog files and work from there.) + + + + 5 + + B + Macro Recording. End users can create and run tests from the web interface without writing code. + 1) UI to turn on macro mode. + 2) basic recording: when you fill out a form while macro mode is on, the submit is caught and displayed as tclwebtest code, and then executed. + 3) UI for creating aa_true tests automatically, based on the content of the page. (For example, a form that says "the returned page must contain [ type regexp here] that spits out aa_true "test X" [string regexp blah blah] + + - Pri A integration of tclwebtest into acs-automated-testing - A: simplify tclwebtest installation - A: better test categorization - use category package? - see related forum posting http://openacs.org/forums/message-view?message_id=150581 for some categories - B: define a test as a collection of other tests, in sequence - B: macro test recording - B: UI to turn on macro mode - B: basic recording: when you fill out a form while macro mode is on, the submit is caught and displayed as tclwebtest code, and then executed - B: UI for creating aa_true tests automatically, based on the content of the page. (For example, a form that says "the returned page must contain [ type regexp here] that spits out aa_true "test X" [string regexp blah blah] - + + + References + + + Forum Posting: tclwebtest with openacs-4/etc/install tests -- help getting started + Forum Posting: Berlin bug bash proposal + Revision History