r3 - 13 Jul 2007 - 11:01:10 - MimiYinYou are here: OSAF >  Projects Web  >  QualityAssuranceTeam > ChandlerAutomatedTestSystemThree
-- MikealRogers - 07 Jun 2007

CATS3

CATS3 is a complete rewrite of the chandler Automated test system.

CATS3 is designed to collect and run recorded scripts from chandlers script_recording parcel as automated tests.

Collector based test running

Instead of defining a static list of tests and test exclusions on various platforms CATS3 uses a test collector.

Any python module in tools/cats/recorded_scripts/ is treated as a test script. When CATS executes each module it runs the module's "run" method.

You can exclude tests from being picked up by the collector by adding the platform string to the modules "_platform_exclusions_" attribute. See "Important metadata" below for more info.

Test dependencies

In the old days we stacked up a series of tests next to each other and many of the tests depended on a previous test's state and account information to run. CATS3 is the exact opposite, each test must not depend on a previous test. Because of this we needed a way to declare common dependencies for different scripts, the most obvious of which is that a test requires that the "account_settings" have been setup.

The recorded_test_lib contains all dependencies. To declare a dependency in a script file you use the module attribute "_depends_", which is list of strings for each dependency method that must be run before the script is executed, more on this in the "Important metadata" section below. Once a dependency is executed it is not run for each subsequent test that depends on it.

Important metadata

None of the following module attributes are written by the recorder, all must be added manually.

  • _depends_ == A list of dependency strings which are required for this script.
  • _platform_exclusions_ == A list of strings ( matching sys.platform ) for each platform this test should not be run on . "all" represents an exclusion on all platforms.
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.