aa::coverage::proc_list (public)

 aa::coverage::proc_list [ -package_key package_key ]

Defined in packages/acs-automated-testing/tcl/coverage-procs.tcl

Creates a list of the procs belonging to a particular package, with its current automated testing covered status, excluding deprecated, callback contracts and not public procs. If no 'package_key' is passed, or the value of the provided package_key is an empty string, then the system wide test proc coverage is returned.

Switches:
-package_key (optional)
The 'package_key' of the package to check.
Returns:
List of dicts, each one with the following values: - package_key: the package key of the package, if the 'package_key' parameter is empty. - proc_name: the proc name. - covered_p: boolean, 'true' if the proc is covered by any automated test, false otherwise.
Author:
Héctor Romojaro
Created:
2019-08-29

Partial Call Graph (max 5 caller/called nodes):
%3 test_aa__coverage_proc_proc_list_covered aa__coverage_proc_proc_list_covered (test acs-automated-testing) aa::coverage::proc_list aa::coverage::proc_list test_aa__coverage_proc_proc_list_covered->aa::coverage::proc_list aa::coverage::proc_coverage aa::coverage::proc_coverage (public) aa::coverage::proc_coverage->aa::coverage::proc_list packages/acs-automated-testing/www/admin/proc-coverage.tcl packages/acs-automated-testing/ www/admin/proc-coverage.tcl packages/acs-automated-testing/www/admin/proc-coverage.tcl->aa::coverage::proc_list

Testcases:
aa__coverage_proc_proc_list_covered
Source code:
    set procs [list]
    foreach path [nsv_array names api_proc_doc_scripts] {
        if { [regexp "^packages/" $path] } {
            set package_name [lindex [split $path "/"] 1]
            if { $package_key eq "" || $package_key eq $package_name } {
                foreach proc_name [nsv_get api_proc_doc_scripts $path] {
                    array set proc_doc [nsv_get api_proc_doc $proc_name]
                    if { [info exists proc_doc(protection)]
                         && "public" in $proc_doc(protection)
                         && !($proc_doc(deprecated_p) || $proc_doc(warn_p))
                         && ![regexp {^callback::.*::contract$} $proc_name]
                         && ![string match xo::db::sql::* $proc_name]
                         && ![string match acs::db::nsdb* $proc_name]
                         && ![string match " Class *" $proc_name]
                         && ![string match " Object *" $proc_name]
                     } {
                        #ns_log notice "proc-doc, for <$proc_name>"
                        set proc_data [dict create]
                        if { $package_key eq "" } {
                            dict set proc_data package_key $package_name
                        }
                        dict set proc_data proc_name $proc_name
                        dict set proc_data covered_p [info exists proc_doc(testcase)]
                        lappend procs "$proc_data"
                    }
                    array unset proc_doc
                }
            }
        }
    }
    return $procs
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: