Index: openacs-4/packages/acs-automated-testing/acs-automated-testing.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/acs-automated-testing.info,v diff -u -N -r1.44 -r1.45 --- openacs-4/packages/acs-automated-testing/acs-automated-testing.info 24 Jul 2018 12:37:07 -0000 1.44 +++ openacs-4/packages/acs-automated-testing/acs-automated-testing.info 24 Jul 2018 17:18:29 -0000 1.45 @@ -7,7 +7,7 @@ t t - + OpenACS The interface to the automated testing facilities within OpenACS. 2017-08-06 @@ -19,7 +19,7 @@ OpenACS system. Also provides a UI for managing automatic-rebuild servers as in a test farm. - + Index: openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl,v diff -u -N -r1.69 -r1.70 --- openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 24 Jul 2018 14:36:27 -0000 1.69 +++ openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 24 Jul 2018 17:18:29 -0000 1.70 @@ -1280,6 +1280,48 @@ return [http -user_id $user_id $href] } + + ad_proc -private detail_link {dict} { + + Create a detail link, which is useful for web-requests, to + inspect the result in case a test fails. + + Missing: cleanup, e.g. after a couple of days, or when the + testcase is executed again (for that we would need testcase_id + and package_key, that we do not want to pass around) + + } { + set nonce REPLY-[clock clicks -microseconds].html + set F [open $::acs::rootdir/packages/acs-automated-testing/www/$nonce w] + puts $F [dict get $dict body] + close $F + return /test/$nonce + } + + ad_proc -public reply_contains {{-prefix ""} dict string} { + Convenience function for test cases + } { + set result [string match *$string* [dict get $dict body]] + if {$result} { + aa_true "${prefix} Reply contains $string (Details)" $result + } else { + aa_true "${prefix} Reply contains $string" $result + } + return $result + } + + ad_proc -public reply_contains_no {{-prefix ""} dict string} { + Convenience function for test cases + } { + set result [string match *$string* [dict get $dict body]] + if {$result} { + aa_false "${prefix} Reply contains no $string (Details)" $result + } else { + aa_false "${prefix} Reply contains no $string" $result + } + return [expr {!$result}] + } + } namespace eval ::acs::test::xpath { Index: openacs-4/packages/acs-automated-testing/www/admin/testcase.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/admin/testcase.adp,v diff -u -N -r1.23 -r1.24 --- openacs-4/packages/acs-automated-testing/www/admin/testcase.adp 24 Jul 2018 14:36:27 -0000 1.23 +++ openacs-4/packages/acs-automated-testing/www/admin/testcase.adp 24 Jul 2018 17:18:29 -0000 1.24 @@ -105,19 +105,19 @@ @tests.timestamp@ FAILED -
@tests.notes@
+
@tests.notes;literal@
@tests.result@ -
@tests.notes@
+
@tests.notes;literal@
@tests.result@ -
@tests.notes@
+
@tests.notes;literal@
@tests.result@ - @tests.notes@ + @tests.notes;literal@ Index: openacs-4/packages/acs-automated-testing/www/admin/testcase.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/admin/testcase.tcl,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-automated-testing/www/admin/testcase.tcl 24 Jul 2018 14:36:27 -0000 1.20 +++ openacs-4/packages/acs-automated-testing/www/admin/testcase.tcl 24 Jul 2018 17:18:29 -0000 1.21 @@ -36,7 +36,17 @@ } -db_multirow tests acs-automated-testing.testcase_query {} +db_multirow tests acs-automated-testing.testcase_query { + if {![string match "*" $notes]} { + # + # Allow only "$url}]