aa_run_testcase (private)
aa_run_testcase testcase_id
Defined in packages/acs-automated-testing/tcl/aa-test-procs.tcl
- Parameters:
- testcase_id (required)
- Author:
- Peter Harper
- Created:
- 24 July 2001
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: upvar exports exports set ::aa_stub_names {} set ::aa_testcase_id $testcase_id set ::aa_testcase_test_id 0 set ::aa_testcase_fails 0 set ::aa_testcase_passes 0 # # Lookup the testcase definition. # set testcase_bodys {} foreach testcase [nsv_get aa_test cases] { if {$testcase_id == [lindex $testcase 0]} { set testcase_file [lindex $testcase 2] set package_key [lindex $testcase 3] set testcase_cats [lindex $testcase 4] set testcase_inits [lindex $testcase 5] set testcase_on_error [lindex $testcase 6] set testcase_bodys [lindex $testcase 7] set ::aa_error_level [lindex $testcase 8] set ::aa_package_key $package_key } } if {[llength $testcase_bodys] == 0} { return } # # Create any file-wide stubs. # if {[nsv_exists aa_file_wide_stubs "$testcase_file"]} { foreach stub_def [nsv_get aa_file_wide_stubs "$testcase_file"] { aa_stub [lindex $stub_def 0] [lindex $stub_def 1] } } # # Run the test # db_dml delete_testcase_results {delete from aa_test_results where testcase_id = :testcase_id} db_dml delete_testcase_final_results {delete from aa_test_final_results where testcase_id = :testcase_id} ns_log debug "aa_run_testcase: Running testcase $testcase_id" set catch_val [catch _${package_key}__$testcase_id msg] if {$catch_val} { aa_log_result "fail" "$testcase_id: Error calling testcase function _${package_key}__$testcase_id: $msg" } aa_check_leftovers -silent end # # Unstub any stubbed functions # foreach stub_name $::aa_stub_names { aa_unstub $stub_name } set ::aa_stub_names {} aa_log_final $::aa_testcase_passes $::aa_testcase_fails unset ::aa_testcase_id # # Cleanup temporary XOTcl objects # if {[namespace which ::xo::at_cleanup] ne ""} { ::xo::at_cleanup }XQL Not present: Generic, PostgreSQL, Oracle