aa_runseries (private)

 aa_runseries [ -stress stress ] [ -security_risk security_risk ] \
    [ -quiet ] [ -testcase_id testcase_id ] [ by_package_keys ] \
    [ by_category ]

Defined in packages/acs-automated-testing/tcl/aa-test-procs.tcl

Runs a series of testcases. Runs all cases if both by_package_keys and by_category are blank, otherwise it uses the package and/or category to select which testcases to run.

Switches:
-stress
(defaults to "0") (optional)
-security_risk
(defaults to "0") (optional)
-quiet
(boolean) (optional)
-testcase_id
(optional)
Parameters:
by_package_keys (optional)
by_category (optional)
Author:
Peter Harper
Created:
24 July 2001

Partial Call Graph (max 5 caller/called nodes):
%3 test_aa__coverage_proc_coverage aa__coverage_proc_coverage (test acs-automated-testing) aa_runseries aa_runseries test_aa__coverage_proc_coverage->aa_runseries test_aa__coverage_proc_coverage_level aa__coverage_proc_coverage_level (test acs-automated-testing) test_aa__coverage_proc_coverage_level->aa_runseries test_aa__coverage_proc_proc_list_covered aa__coverage_proc_proc_list_covered (test acs-automated-testing) test_aa__coverage_proc_proc_list_covered->aa_runseries test_webtest_example webtest_example (test acs-automated-testing) test_webtest_example->aa_runseries _ _ (public) aa_runseries->_ aa_run_testcase aa_run_testcase (private) aa_runseries->aa_run_testcase aa_test::write_test_file aa_test::write_test_file (private) aa_runseries->aa_test::write_test_file packages/acs-automated-testing/www/admin/rerun.tcl packages/acs-automated-testing/ www/admin/rerun.tcl packages/acs-automated-testing/www/admin/rerun.tcl->aa_runseries

Testcases:
webtest_example, aa__coverage_proc_coverage, aa__coverage_proc_proc_list_covered, aa__coverage_proc_coverage_level
Source code:
    # probably transitional code for testing purposes
    if {[info commands ::aa::coverage::add_traces] ne ""} {
        catch {aa::coverage::add_traces}
    }

    set ::aa_run_quietly_p $quiet_p
    #
    # Work out the list of initialization classes.
    #
    set testcase_ids {}
    if {$testcase_id ne ""} {
        lappend testcase_ids $testcase_id
        foreach testcase [nsv_get aa_test cases] {
            if {$testcase_id == [lindex $testcase 0]} {
                set package_key     [lindex $testcase 3]
                set init_classes    [lindex $testcase 5]
                foreach init_class $init_classes {
                    set classes([list $package_key $init_class]) 1
                }
            }
        }
    } else {
        foreach testcase [nsv_get aa_test cases] {
            set testcase_id     [lindex $testcase 0]
            set package_key     [lindex $testcase 3]
            set categories      [lindex $testcase 4]
            set init_classes    [lindex $testcase 5]

            # try to disqualify the test case

            # check if package key belongs to the ones we are testing
            if { $by_package_keys ne "" && $package_key ni $by_package_keys } {
                continue
            }

            # is it the wrong category?
            if { $by_category ne "" && $by_category ni $categories } {
                continue
            }

            # if we don't want stress, then the test must not be stress
            if { ! $stress && "stress" in $categories } {
                continue
            }

            # if we don't want security risks, then the test must not be stress
            if { ! $security_risk && "security_risk" in $categories } {
                continue
            }

            # we made it through the filters, so add the test case
            lappend testcase_ids $testcase_id
            foreach init_class $init_classes {
                set classes([list $package_key $init_class]) 1
            }
        }
    }
    #
    # Run each initialization script.  Keep a list of the exported variables
    # by each initialization script so each testcase (and destructor) can
    # correctly upvar to gain visibility of them.
    #
    if {[info exists classes]} {
        foreach initpair [array names classes] {
            lassign $initpair package_key init_class
            set _aa_export {}
            set ::aa_init_class_logs([list $package_key $init_class]) {}
            set ::aa_in_init_class [list $package_key $init_class]
            _${package_key}__i_$init_class
            set _aa_exports([list $package_key $init_class]) $_aa_export
        }
    }
    set ::aa_in_init_class ""

    #
    # Run each testcase
    #
    foreach testcase_id $testcase_ids {
        ns_log notice "========================================= start $testcase_id"
        aa_run_testcase $testcase_id
        ns_log notice "========================================= end $testcase_id"
    }

    #
    # Run each initialization destructor script.
    #
    if {[info exists classes]} {
        foreach initpair [array names classes] {
            lassign $initpair package_key init_class
            set ::aa_in_init_class [list $package_key $init_class]
            _${package_key}__d_$init_class
        }
    }
    set ::aa_in_init_class ""

    # Generate the XML report file
    aa_test::write_test_file
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: