aa_test::parse_test_file (public)

 aa_test::parse_test_file -path path -array array

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

Processes the xml report with test result data for display.

Switches:
-path (required)
-array (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-automated-testing/www/index.tcl packages/acs-automated-testing/ www/index.tcl aa_test::parse_test_file aa_test::parse_test_file packages/acs-automated-testing/www/index.tcl->aa_test::parse_test_file packages/acs-automated-testing/www/server.tcl packages/acs-automated-testing/ www/server.tcl packages/acs-automated-testing/www/server.tcl->aa_test::parse_test_file template::util::read_file template::util::read_file (public) aa_test::parse_test_file->template::util::read_file xml_doc_get_first_node xml_doc_get_first_node (public) aa_test::parse_test_file->xml_doc_get_first_node xml_node_get_attribute xml_node_get_attribute (public) aa_test::parse_test_file->xml_node_get_attribute xml_node_get_children_by_name xml_node_get_children_by_name (public) aa_test::parse_test_file->xml_node_get_children_by_name xml_node_get_content xml_node_get_content (public) aa_test::parse_test_file->xml_node_get_content

Testcases:
No testcase defined.
Source code:
    upvar 1 $array test

    set tree [xml_parse -persist [template::util::read_file $path]]

    set root_node [xml_doc_get_first_node $tree]

    # Get the total test case count
    set testcase_count_node [xml_node_get_children_by_name $root_node testcase_count]
    set test(testcase_count) [xml_node_get_content $testcase_count_node]

    # Get the result counts by result type
    foreach result_count_node [xml_node_get_children_by_name $root_node result_count] {
        set result [xml_node_get_attribute $result_count_node result]
        set count [xml_node_get_content $result_count_node]
        set result_count($result$count
    }
    set test(result_count) [array get result_count]

    # Get counts for failing test cases
    foreach testcase_failure_node [xml_node_get_children_by_name $root_node testcase_failure] {
        set testcase_id [xml_node_get_attribute $testcase_failure_node testcase_id]
        set count [xml_node_get_content $testcase_failure_node]
        set testcase_failure($testcase_id$count
    }
    set test(testcase_failure) [array get testcase_failure]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: