Commit 848a0730 authored by Frank Bergmann's avatar Frank Bergmann

- Updated to OpenACS 5.9.1

parent 4d8436f5
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<initial-install-p>t</initial-install-p> <initial-install-p>t</initial-install-p>
<singleton-p>t</singleton-p> <singleton-p>t</singleton-p>
<version name="5.9.0" url="http://openacs.org/repository/download/apm/acs-automated-testing-5.9.0.apm"> <version name="5.9.1" url="http://openacs.org/repository/download/apm/acs-automated-testing-5.9.1.apm">
<owner url="http://openacs.org">OpenACS</owner> <owner url="http://openacs.org">OpenACS</owner>
<summary>The interface to the automated testing facilities within OpenACS.</summary> <summary>The interface to the automated testing facilities within OpenACS.</summary>
<release-date>2015-10-04</release-date> <release-date>2017-08-06</release-date>
<vendor url="http://openacs.org">OpenACS</vendor> <vendor url="http://openacs.org">OpenACS</vendor>
<maturity>3</maturity> <maturity>3</maturity>
<license url="http://www.gnu.org/copyleft/gpl.html">GPL version 2</license> <license url="http://www.gnu.org/copyleft/gpl.html">GPL version 2</license>
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
OpenACS system. Also provides a UI for managing OpenACS system. Also provides a UI for managing
automatic-rebuild servers as in a test farm.</description> automatic-rebuild servers as in a test farm.</description>
<provides url="acs-automated-testing" version="5.9.0"/> <provides url="acs-automated-testing" version="5.9.1"/>
<requires url="acs-kernel" version="5.9.0"/> <requires url="acs-kernel" version="5.9.1"/>
<callbacks> <callbacks>
</callbacks> </callbacks>
......
...@@ -2,20 +2,6 @@ ...@@ -2,20 +2,6 @@
<queryset> <queryset>
<rdbms><type>oracle</type><version>8.1.6</version></rdbms> <rdbms><type>oracle</type><version>8.1.6</version></rdbms>
<fullquery name="aa_run_testcase.delete_testcase_results_sql">
<querytext>
delete from aa_test_results
where testcase_id = :testcase_id
</querytext>
</fullquery>
<fullquery name="aa_run_testcase.delete_testcase_final_results_sql">
<querytext>
delete from aa_test_final_results
where testcase_id = :testcase_id
</querytext>
</fullquery>
<fullquery name="aa_log_result.test_result_insert"> <fullquery name="aa_log_result.test_result_insert">
<querytext> <querytext>
insert into aa_test_results insert into aa_test_results
......
...@@ -2,20 +2,6 @@ ...@@ -2,20 +2,6 @@
<queryset> <queryset>
<rdbms><type>postgresql</type><version>7.1</version></rdbms> <rdbms><type>postgresql</type><version>7.1</version></rdbms>
<fullquery name="aa_run_testcase.delete_testcase_results_sql">
<querytext>
delete from aa_test_results
where testcase_id = :testcase_id
</querytext>
</fullquery>
<fullquery name="aa_run_testcase.delete_testcase_final_results_sql">
<querytext>
delete from aa_test_final_results
where testcase_id = :testcase_id
</querytext>
</fullquery>
<fullquery name="aa_log_result.test_result_insert"> <fullquery name="aa_log_result.test_result_insert">
<querytext> <querytext>
insert into aa_test_results insert into aa_test_results
......
...@@ -39,7 +39,7 @@ proc aa_proc_copy {proc_name_old proc_name_new {new_body ""}} { ...@@ -39,7 +39,7 @@ proc aa_proc_copy {proc_name_old proc_name_new {new_body ""}} {
# (like for proc based ad_procs), but the real argument/parameter # (like for proc based ad_procs), but the real argument/parameter
# list, we address these differences here for all needed cases. # list, we address these differences here for all needed cases.
# #
if {[info proc $proc_name_old] ne ""} { if {[info procs $proc_name_old] ne ""} {
# #
# We copy a regular Tcl proc # We copy a regular Tcl proc
# #
...@@ -158,7 +158,7 @@ ad_proc -public aa_register_init_class { ...@@ -158,7 +158,7 @@ ad_proc -public aa_register_init_class {
running a set of testcases, and the descructor called <strong>once</strong> running a set of testcases, and the descructor called <strong>once</strong>
upon completion of running a set of testcases.<p> upon completion of running a set of testcases.<p>
The idea behind this is that it could be used to perform data intensive The idea behind this is that it could be used to perform data intensive
operations that shared amoungst a set if testcases. For example, mounting operations that shared amongst a set if testcases. For example, mounting
an instance of a package. This could be performed by each testcase an instance of a package. This could be performed by each testcase
individually, but this would be highly inefficient if there are any individually, but this would be highly inefficient if there are any
significant number of them. significant number of them.
...@@ -398,7 +398,7 @@ ad_proc -public aa_register_case { ...@@ -398,7 +398,7 @@ ad_proc -public aa_register_case {
if { $library eq "tclwebtest" } { if { $library eq "tclwebtest" } {
# kludge: until tclwebtest installs itself in the proper # kludge: until tclwebtest installs itself in the proper
# place following the tcl way, we use this absolute path # place following the Tcl way, we use this absolute path
# hack. # hack.
set tclwebtest_absolute_path "/usr/local/tclwebtest/lib" set tclwebtest_absolute_path "/usr/local/tclwebtest/lib"
if { ![info exists ::auto_path] || [lsearch $::auto_path $tclwebtest_absolute_path] == -1 } { if { ![info exists ::auto_path] || [lsearch $::auto_path $tclwebtest_absolute_path] == -1 } {
...@@ -933,11 +933,7 @@ ad_proc -public aa_log_final { ...@@ -933,11 +933,7 @@ ad_proc -public aa_log_final {
ns_log Bug "aa_log_final: FAILED: $aa_testcase_id, $test_fails tests failed" ns_log Bug "aa_log_final: FAILED: $aa_testcase_id, $test_fails tests failed"
} }
db_dml testcase_result_insert { db_dml testcase_result_insert {}
insert into aa_test_final_results
(testcase_id, package_key, timestamp, passes, fails)
values (:aa_testcase_id, :aa_package_key, sysdate, :test_passes, :test_fails)
}
} }
ad_proc -public aa_run_with_teardown { ad_proc -public aa_run_with_teardown {
...@@ -1248,12 +1244,12 @@ ad_proc -public aa_test::parse_test_file { ...@@ -1248,12 +1244,12 @@ ad_proc -public aa_test::parse_test_file {
ad_proc -public aa_get_first_url { ad_proc -public aa_get_first_url {
{-package_key:required} {-package_key:required}
} { } {
Procedure for geting the url of a mounted package with the package_key. It uses the first instance that it founds. This is usefull for tclwebtest tests. Procedure for geting the url of a mounted package with the package_key. It uses the first instance that it founds. This is useful for tclwebtest tests.
} { } {
if {![db_0or1row first_url { *SQL* }]} { if {![db_0or1row first_url {}]} {
site_node::instantiate_and_mount -package_key $package_key site_node::instantiate_and_mount -package_key $package_key
db_1row first_url {*SQL*} db_1row first_url {}
} }
return $url return $url
......
...@@ -587,7 +587,7 @@ proc http::geturl { url args } { ...@@ -587,7 +587,7 @@ proc http::geturl { url args } {
# get trying to write the post data. Having both fileevents active # get trying to write the post data. Having both fileevents active
# changes the timing and the behavior, but no two platforms # changes the timing and the behavior, but no two platforms
# (among Solaris, Linux, and NT) behave the same, and none # (among Solaris, Linux, and NT) behave the same, and none
# behave all that well in any case. Servers should always read thier # behave all that well in any case. Servers should always read their
# POST data if they expect the client to read their response. # POST data if they expect the client to read their response.
if {$isQuery || $isQueryChannel} { if {$isQuery || $isQueryChannel} {
...@@ -1005,7 +1005,7 @@ proc http::CopyStart {s token} { ...@@ -1005,7 +1005,7 @@ proc http::CopyStart {s token} {
# #
# Arguments # Arguments
# token The token returned from http::geturl # token The token returned from http::geturl
# count The amount transfered # count The amount transferred
# #
# Side Effects # Side Effects
# Invokes callbacks # Invokes callbacks
...@@ -1133,7 +1133,7 @@ proc http::mapReply {string} { ...@@ -1133,7 +1133,7 @@ proc http::mapReply {string} {
# The spec says: "non-alphanumeric characters are replaced by '%HH'" # The spec says: "non-alphanumeric characters are replaced by '%HH'"
# 1 leave alphanumerics characters alone # 1 leave alphanumerics characters alone
# 2 Convert every other character to an array lookup # 2 Convert every other character to an array lookup
# 3 Escape constructs that are "special" to the tcl parser # 3 Escape constructs that are "special" to the Tcl parser
# 4 "subst" the result, doing all the array substitutions # 4 "subst" the result, doing all the array substitutions
regsub -all \[^$alphanumeric\] $string {$formMap(&)} string regsub -all \[^$alphanumeric\] $string {$formMap(&)} string
...@@ -1164,7 +1164,7 @@ proc http::ProxyRequired {host} { ...@@ -1164,7 +1164,7 @@ proc http::ProxyRequired {host} {
# http::CharsetToEncoding -- # http::CharsetToEncoding --
# #
# Tries to map a given IANA charset to a tcl encoding. # Tries to map a given IANA charset to a Tcl encoding.
# If no encoding can be found, returns binary. # If no encoding can be found, returns binary.
# #
......
...@@ -38,7 +38,7 @@ ad_proc twt::do_request { page_url } { ...@@ -38,7 +38,7 @@ ad_proc twt::do_request { page_url } {
{unreachable} - {refused} { {unreachable} - {refused} {
::twt::log "Failed to connect to server with error \"$errmsg\" - retrying" ::twt::log "Failed to connect to server with error \"$errmsg\" - retrying"
incr retry_count incr retry_count
exec sleep 5 exec "sleep" "5"
set error_p 0 set error_p 0
continue continue
} }
...@@ -53,7 +53,7 @@ ad_proc twt::do_request { page_url } { ...@@ -53,7 +53,7 @@ ad_proc twt::do_request { page_url } {
} }
if { $error_p } { if { $error_p } {
# Either some non-socket error, or a socket problem occuring with more than # Either some non-socket error, or a socket problem occurring with more than
# $retry_max times. Propagate the error while retaining the stack trace # $retry_max times. Propagate the error while retaining the stack trace
aa_log "twt::do_request failed with error=\"$errmsg\" response_url=\"[tclwebtest::response url]\". See error log for the HTML response body" aa_log "twt::do_request failed with error=\"$errmsg\" response_url=\"[tclwebtest::response url]\". See error log for the HTML response body"
ns_log Error "twt::do_request failed with error=\"$errmsg\" response_url=\"[tclwebtest::response url]\" response_body=\"[tclwebtest::response body]\"" ns_log Error "twt::do_request failed with error=\"$errmsg\" response_url=\"[tclwebtest::response url]\" response_body=\"[tclwebtest::response body]\""
...@@ -192,11 +192,11 @@ ad_proc twt::user::login { email password {username ""}} { ...@@ -192,11 +192,11 @@ ad_proc twt::user::login { email password {username ""}} {
set response_url [tclwebtest::response url] set response_url [tclwebtest::response url]
if { ![string match "*${home_uri}*" $response_url] } { if { ![string match "*${home_uri}*" $response_url] } {
if { [cc_lookup_email_user $email] eq "" } { if { [party::get_by_email -email $email] eq "" } {
error "Failed to login user with email=\"$email\" and password=\"$password\". No user with such email in database." error "Failed to login user with email=\"$email\" and password=\"$password\". No user with such email in database."
} else { } else {
ns_log Error "Failed to log in user with email=\"$email\" and password=\"$password\" eventhough email exists (password may be incorrect). response_body=[tclwebtest::response body]" ns_log Error "Failed to log in user with email=\"$email\" and password=\"$password\" even though email exists (password may be incorrect). response_body=[tclwebtest::response body]"
error "Failed to log in user with email=\"$email\" and password=\"$password\" eventhough email exists (password may be incorrect). User should be able to request $home_uri without redirection, however response url=$response_url" error "Failed to log in user with email=\"$email\" and password=\"$password\" even though email exists (password may be incorrect). User should be able to request $home_uri without redirection, however response url=$response_url"
} }
} }
......
...@@ -14,8 +14,6 @@ db_dml delete_testcase_tests_sql $sql ...@@ -14,8 +14,6 @@ db_dml delete_testcase_tests_sql $sql
set sql "delete from aa_test_final_results" set sql "delete from aa_test_final_results"
db_dml delete_testcase_tests_sql $sql db_dml delete_testcase_tests_sql $sql
ad_returnredirect "index"
ad_returnredirect "index?by_package_key=$package_key&by_category=$category&view_by=$view_by&quiet=$quiet" ad_returnredirect "index?by_package_key=$package_key&by_category=$category&view_by=$view_by&quiet=$quiet"
# Local variables: # Local variables:
......
<master> <master>
<property name="head">
<style>
dl {background-color: #e4e4e4;}
dl dd {margin: 0px 0px 10px 40px;}
</style>
</property>
<property name="doc(title)">@title;literal@</property> <property name="doc(title)">@title;literal@</property>
<property name="context">@context;literal@</property> <property name="context">@context;literal@</property>
<html> <h2> @title@ </h2>
<body> <dl>
<table width="100%"><tr><td bgcolor="#e4e4e4"> <dt><strong>Description:</strong></dt><dd>@component_desc;noquote@</dd>
<h2> @title@ </h2> <dt><strong>Defined in file:</strong></dt><dd>@component_file@</dd>
<blockquote> <dt><strong> Component body </strong> </dt>
<dt><b>Description:</b></dt><dd>@component_desc@</dd>
<dt><b>Defined in file:</b></dt><dd>@component_file@</dd>
<dt><b> Component body </b> </dt>
<dd><pre> <dd><pre>
@component_body@ @component_body@
</pre></dd> </pre></dd>
</blockquote> </dl>
</td></tr></table>
</body>
</html>
ad_page_contract { ad_page_contract {
@cvs-id $Id$ @cvs-id $Id$
} { } {
component_id:naturalnum,notnull component_id:token,notnull
package_key:nohtml package_key:nohtml
} -properties { } -properties {
title:onevalue title:onevalue
......
...@@ -83,16 +83,16 @@ ...@@ -83,16 +83,16 @@
</table> </table>
<blockquote> <blockquote>
<div><b>&raquo;</b> <div><strong>&raquo;</strong>
<a href="rerun?package_key=@by_package_key@&amp;category=@by_category@&amp;view_by=@view_by@&amp;quiet=@quiet@&amp;stress=@stress@&amp;security_risk=@security_risk@"> Rerun displayed test cases</a> <a href="rerun?package_key=@by_package_key@&amp;category=@by_category@&amp;view_by=@view_by@&amp;quiet=@quiet@&amp;stress=@stress@&amp;security_risk=@security_risk@"> Rerun displayed test cases</a>
</div> </div>
<div> <div>
<b>&raquo;</b> <strong>&raquo;</strong>
<a href="clear?package_key=@by_package_key@&amp;category=@by_category@&amp;view_by=@view_by@&amp;quiet=@quiet@&amp;stress=@stress@&amp;security_risk=@security_risk@"> Clear test result data</a> <a href="clear?package_key=@by_package_key@&amp;category=@by_category@&amp;view_by=@view_by@&amp;quiet=@quiet@&amp;stress=@stress@&amp;security_risk=@security_risk@"> Clear test result data</a>
</div> </div>
<if @by_package_key@ ne ""> <if @by_package_key@ ne "">
<div> <div>
<b>&raquo;</b> <strong>&raquo;</strong>
<a href="@record_url@"> Record a test</a> <a href="@record_url@"> Record a test</a>
</div> </div>
</if> </if>
...@@ -116,8 +116,10 @@ ...@@ -116,8 +116,10 @@
</else> </else>
<td> <a href="index?stress=@stress@&amp;security_risk=@security_risk@&amp;by_package_key=@packageinfo.key@&amp;view_by=testcase&amp;quiet=@quiet@">@packageinfo.key@</a></td> <td> <a href="index?stress=@stress@&amp;security_risk=@security_risk@&amp;by_package_key=@packageinfo.key@&amp;view_by=testcase&amp;quiet=@quiet@">@packageinfo.key@</a></td>
<if @packageinfo.total@ eq "0"> <if @packageinfo.total@ eq "0">
<td> No Data </td><td>-</td><td>-</td> <td align="right">No data</td>
<td style="color:#ff0000"> fail </td> <td align="right">-</td>
<td align="right">-</td>
<td align="right">-</td>
</if><else> </if><else>
<td align="right"> @packageinfo.total@ </td> <td align="right"> @packageinfo.total@ </td>
<td align="right"> @packageinfo.passes@ </td> <td align="right"> @packageinfo.passes@ </td>
...@@ -156,12 +158,14 @@ ...@@ -156,12 +158,14 @@
<tr class="even"> <tr class="even">
</else> </else>
<td> @tests.package_key@ </td> <td> @tests.package_key@ </td>
<td> <a href="testcase?testcase_id=@tests.id@&amp;package_key=@tests.package_key@&amp;view_by=@view_by@&amp;category=@by_category@&amp;quiet=@quiet@">@tests.id@</a></td> <td><a href="@tests.url@">@tests.id@</a></td>
<td> @tests.categories@ </td> <td> @tests.categories@ </td>
<td> @tests.description@ </td> <td> @tests.description@ </td>
<if @tests.timestamp@ eq ""> <if @tests.timestamp@ eq "">
<td> No Data </td><td>-</td><td>-</td> <td>No data</td>
<td style="color:#ff0000"> fail </td> <td>-</td>
<td align="right">-</td>
<td align="right">-</td>
</if><else> </if><else>
<td> <td>
<if @tests.fails@ gt 0> <if @tests.fails@ gt 0>
...@@ -181,16 +185,16 @@ ...@@ -181,16 +185,16 @@
<blockquote> <blockquote>
<div> <div>
<b>&raquo;</b> <strong>&raquo;</strong>
<a href="rerun?package_key=@by_package_key@&amp;category=@by_category@&amp;view_by=@view_by@&amp;quiet=@quiet@&amp;stress=@stress@&amp;security_risk=@security_risk@"> Rerun displayed test cases</a> <a href="rerun?package_key=@by_package_key@&amp;category=@by_category@&amp;view_by=@view_by@&amp;quiet=@quiet@&amp;stress=@stress@&amp;security_risk=@security_risk@"> Rerun displayed test cases</a>
</div> </div>
<div> <div>
<b>&raquo;</b> <strong>&raquo;</strong>
<a href="clear?package_key=@by_package_key@&amp;category=@by_category@&amp;view_by=@view_by@&amp;quiet=@quiet@&amp;stress=@stress@&amp;security_risk=@security_risk@"> Clear test result data</a> <a href="clear?package_key=@by_package_key@&amp;category=@by_category@&amp;view_by=@view_by@&amp;quiet=@quiet@&amp;stress=@stress@&amp;security_risk=@security_risk@"> Clear test result data</a>
</div> </div>
<if @by_package_key@ ne ""> <if @by_package_key@ ne "">
<div> <div>
<b>&raquo;</b> <strong>&raquo;</strong>
<a href="@record_url@"> Record a test</a> <a href="@record_url@"> Record a test</a>
</div> </div>
</if> </if>
......
...@@ -21,6 +21,7 @@ ad_page_contract { ...@@ -21,6 +21,7 @@ ad_page_contract {
quiet:onevalue quiet:onevalue
} }
set title "System test cases" set title "System test cases"
set return_url [ad_return_url]
if {$by_package_key ne ""} { if {$by_package_key ne ""} {
append title " for package $by_package_key" append title " for package $by_package_key"
...@@ -95,7 +96,7 @@ if {$view_by eq "package"} { ...@@ -95,7 +96,7 @@ if {$view_by eq "package"} {
# #
# Prepare the template data for a view_by "testcase" # Prepare the template data for a view_by "testcase"
# #
template::multirow create tests id description package_key categories \ template::multirow create tests id url description package_key categories \
timestamp passes fails marker timestamp passes fails marker
set old_package_key "" set old_package_key ""
foreach testcase [nsv_get aa_test cases] { foreach testcase [nsv_get aa_test cases] {
...@@ -124,7 +125,11 @@ if {$view_by eq "package"} { ...@@ -124,7 +125,11 @@ if {$view_by eq "package"} {
} else { } else {
set marker 0 set marker 0
} }
template::multirow append tests $testcase_id $testcase_desc \ set testcase_url [export_vars -base "testcase" -url {testcase_id package_key view_by {category by_category} quiet return_url}]
template::multirow append tests \
$testcase_id \
$testcase_url \
$testcase_desc \
$package_key \ $package_key \
$categories_str \ $categories_str \
$testcase_timestamp \ $testcase_timestamp \
...@@ -147,11 +152,8 @@ foreach category [nsv_get aa_test categories] { ...@@ -147,11 +152,8 @@ foreach category [nsv_get aa_test categories] {
template::multirow append exclusion_categories $category template::multirow append exclusion_categories $category
} }
} }
#
# Set return url
#
set record_url [export_vars -base "record-test" -url {{return_url [ad_return_url]} package_key}] set record_url [export_vars -base "record-test" -url {return_url package_key}]
ad_return_template ad_return_template
# Local variables: # Local variables:
......
...@@ -7,7 +7,7 @@ ad_page_contract { ...@@ -7,7 +7,7 @@ ad_page_contract {
@cvs-id $Id$ @cvs-id $Id$
} { } {
absolute_file_path absolute_file_path
return_url return_url:localurl
} }
ns_log Notice "Sourcing test definition file $absolute_file_path" ns_log Notice "Sourcing test definition file $absolute_file_path"
......
...@@ -9,7 +9,7 @@ ad_page_contract { ...@@ -9,7 +9,7 @@ ad_page_contract {
@cvs-id $Id$ @cvs-id $Id$
} { } {
package_key package_key
{return_url ""} {return_url:localurl ""}
} -properties { } -properties {
} -validate { } -validate {
} -errors { } -errors {
...@@ -18,7 +18,7 @@ ad_page_contract { ...@@ -18,7 +18,7 @@ ad_page_contract {
# Todo # Todo
# This is a first attempt of integrating the TwtR # This is a first attempt of integrating the TwtR
# with oacs. I think it is a good point to start # with oacs. I think it is a good point to start
# but in the ToDo list would be really usefull to # but in the ToDo list would be really useful to
# have: # have:
# - Parsing the Test code to replace fixed values with # - Parsing the Test code to replace fixed values with
# Random ones (i.e. names, descriptions, intervals, # Random ones (i.e. names, descriptions, intervals,
...@@ -50,7 +50,7 @@ ad_form -name new_test -method post -export {package_key return_url} \ ...@@ -50,7 +50,7 @@ ad_form -name new_test -method post -export {package_key return_url} \
{ search_str:text,optional { search_str:text,optional
{label "Search String"} {label "Search String"}
{html {size 50}} {html {size 50}}
{help_text "Sometimes, you might need this string to check if the test is successfull or no (i.e. testing Warning messages) <br> If you want to check more than one string, use a comma to separate the different strings"} {help_text "Sometimes, you might need this string to check if the test is successful or no (i.e. testing Warning messages) <br> If you want to check more than one string, use a comma to separate the different strings"}
} }
{ login_type:integer(select) { login_type:integer(select)
{label "Login Type"} {label "Login Type"}
...@@ -84,7 +84,7 @@ ad_form -name new_test -method post -export {package_key return_url} \ ...@@ -84,7 +84,7 @@ ad_form -name new_test -method post -export {package_key return_url} \
} \ } \
-new_data { -new_data {
# Open the automated tests tcl file # Open the automated tests Tcl file
# of this package key and add the # of this package key and add the
# test code to the script, then # test code to the script, then
# do an eval to load the test proc. # do an eval to load the test proc.
......
...@@ -43,13 +43,13 @@ ...@@ -43,13 +43,13 @@
</else> </else>
<ul> <ul>
<li><a href="rerun?testcase_id=@testcase_id@&amp;package_key=@package_key@&amp;quiet=@quiet@">Rerun this test case</a></li> <li><a href="@rerun_url@">Rerun this test case</a></li>
<li><a href="@resource_file_url@">Resource test definition file</a></li> <li><a href="@resource_file_url@">Resource test definition file</a></li>
<li><a href="@return_url@">Back to testcase list</a></li> <li><a href="@return_url@">Back to testcase list</a></li>
</ul> </ul>
<p> <p>
<b>Results</b> <strong>Results</strong>
[<if @quiet@ eq "1"> [<if @quiet@ eq "1">
<strong> quiet </strong> | <strong> quiet </strong> |
<a href="@verbose_url@">verbose</a> <a href="@verbose_url@">verbose</a>
...@@ -66,7 +66,15 @@ ...@@ -66,7 +66,15 @@
</tr> </tr>
<multiple name="tests_quiet"> <multiple name="tests_quiet">
<tr> <tr>
<if @tests_quiet.result@ eq "fail">
<td class="fail">FAILED</td>
</if>
<elseif @tests_quiet.result@ eq "pass">
<td class="ok">@tests_quiet.result@</td>
</elseif>
<else>
<td>@tests_quiet.result@</td> <td>@tests_quiet.result@</td>
</else>
<td align="right" class="@tests_quiet.result@">@tests_quiet.count@</td> <td align="right" class="@tests_quiet.result@">@tests_quiet.count@</td>
</tr> </tr>
</multiple> </multiple>
...@@ -94,8 +102,11 @@ ...@@ -94,8 +102,11 @@
<if @tests.result@ eq "fail"> <if @tests.result@ eq "fail">
<td class="fail">FAILED</td> <td class="fail">FAILED</td>
</if> </if>
<else> <elseif @tests.result@ eq "pass">
<td class="ok">@tests.result@</td> <td class="ok">@tests.result@</td>
</elseif>
<else>
<td>@tests.result@</td>
</else> </else>
<td><pre>@tests.notes@</pre></td> <td><pre>@tests.notes@</pre></td>
</tr> </tr>
...@@ -104,7 +115,7 @@ ...@@ -104,7 +115,7 @@
</table> </table>
<ul> <ul>
<li><a href="rerun?testcase_id=@testcase_id@&amp;package_key=@package_key@&amp;quiet=@quiet@">Rerun this test case</a></li> <li><a href="@rerun_url@">Rerun this test case</a></li>
<li><a href="@resource_file_url@">Resource test definition file</a></li> <li><a href="@resource_file_url@">Resource test definition file</a></li>
<li><a href="@return_url@">Back to testcase list</a></li> <li><a href="@return_url@">Back to testcase list</a></li>
</ul> </ul>
...@@ -5,6 +5,7 @@ ad_page_contract { ...@@ -5,6 +5,7 @@ ad_page_contract {
package_key:token package_key:token
{showsource:boolean 0} {showsource:boolean 0}
{quiet:boolean 1} {quiet:boolean 1}
{return_url ""}
} -properties { } -properties {
title:onevalue title:onevalue
context_bar:onevalue context_bar:onevalue
...@@ -85,7 +86,7 @@ if {[llength $testcase_bodys] == 0} { ...@@ -85,7 +86,7 @@ if {[llength $testcase_bodys] == 0} {
# #
# Work out the URL for this directory (stripping off the file element). # Work out the URL for this directory (stripping off the file element).
# #
set url "[ad_conn url]" set url [ad_conn url]
regexp {(.*)/[^/]*} $url {\\1} url regexp {(.*)/[^/]*} $url {\\1} url
append url "/component?package_key=${package_key}" append url "/component?package_key=${package_key}"
...@@ -106,7 +107,11 @@ set resource_file_url [export_vars -base init-file-resource { ...@@ -106,7 +107,11 @@ set resource_file_url [export_vars -base init-file-resource {
{absolute_file_path $testcase_file} {absolute_file_path $testcase_file}
}] }]
set return_url [export_vars -base . { { view_by testcase } quiet { by_package_key $package_key } }] set rerun_url [export_vars -base rerun {testcase_id package_key quiet {return_url [ad_return_url]}}]
if {$return_url eq ""} {
set return_url [export_vars -base . { { view_by testcase } quiet { by_package_key $package_key } }]
}
set quiet_url "[export_vars -base testcase -entire_form -exclude {quiet}]&quiet=1" set quiet_url "[export_vars -base testcase -entire_form -exclude {quiet}]&quiet=1"
set verbose_url "[export_vars -base testcase -entire_form -exclude {quiet}]&quiet=0" set verbose_url "[export_vars -base testcase -entire_form -exclude {quiet}]&quiet=0"
......
<property name="context">{/doc/acs-automated-testing {Automated Testing}} {Automated Testing}</property> <property name="context">{/doc/acs-automated-testing {ACS Automated Testing}} {Automated Testing}</property>
<property name="doc(title)">Automated Testing</property> <property name="doc(title)">Automated Testing</property>
<master> <master>
<div class="article" lang="en"> <div class="article" lang="en">
......
<property name="context">{/doc/acs-automated-testing {Automated Testing}} {Installation}</property> <property name="context">{/doc/acs-automated-testing {ACS Automated Testing}} {Installation}</property>
<property name="doc(title)">Installation</property> <property name="doc(title)">Installation</property>
<master> <master>
<include src="/packages/acs-core-docs/lib/navheader" <include src="/packages/acs-core-docs/lib/navheader"
......
<property name="context">{/doc/acs-automated-testing {Automated Testing}} {Requirements}</property> <property name="context">{/doc/acs-automated-testing {ACS Automated Testing}} {Requirements}</property>
<property name="doc(title)">Requirements</property> <property name="doc(title)">Requirements</property>
<master> <master>
<include src="/packages/acs-core-docs/lib/navheader" <include src="/packages/acs-core-docs/lib/navheader"
...@@ -50,7 +50,7 @@ those commands fail gracefully.</td> ...@@ -50,7 +50,7 @@ those commands fail gracefully.</td>
<span class="strong">tclwebtest is easy to install</span>. <span class="strong">tclwebtest is easy to install</span>.
Tclwebtest installation is fully documented and can be installed Tclwebtest installation is fully documented and can be installed
with less than five steps. (Install is documented in 5.0, but with less than five steps. (Install is documented in 5.0, but
there's a can't-find-config error; also, some new work in there&#39;s a can&#39;t-find-config error; also, some new work in
tclwebtest HEAD needs to packaged in a new tarball release.)</td> tclwebtest HEAD needs to packaged in a new tarball release.)</td>
</tr><tr> </tr><tr>
<td>2</td><td>Done</td><td>Done</td><td> <td>2</td><td>Done</td><td>Done</td><td>
...@@ -78,7 +78,7 @@ exported</span>. It should be possible to import a test into the ...@@ -78,7 +78,7 @@ exported</span>. It should be possible to import a test into the
database from a file, and to export it to a file. These files database from a file, and to export it to a file. These files
should be sharable by different OpenACS installations. It should be should be sharable by different OpenACS installations. It should be
possible to import/export directly between running OpenACS sites. possible to import/export directly between running OpenACS sites.
(We should look at what did and didn't work in acs-lang catalog (We should look at what did and didn&#39;t work in acs-lang catalog
files and work from there.)</td> files and work from there.)</td>
</tr><tr> </tr><tr>
<td>5</td><td> </td><td>B</td><td> <td>5</td><td> </td><td>B</td><td>
...@@ -87,14 +87,14 @@ create and run tests from the web interface without writing code. ...@@ -87,14 +87,14 @@ create and run tests from the web interface without writing code.
<p>1) UI to turn on macro mode.</p><p>2) basic recording: when you fill out a form while macro mode is <p>1) UI to turn on macro mode.</p><p>2) basic recording: when you fill out a form while macro mode is
on, the submit is caught and displayed as tclwebtest code, and then on, the submit is caught and displayed as tclwebtest code, and then
executed.</p><p>3) UI for creating aa_true tests automatically, based on the executed.</p><p>3) UI for creating aa_true tests automatically, based on the
content of the page. (For example, a form that says "the returned content of the page. (For example, a form that says "the
page must contain [ type regexp here] that spits out aa_true "test returned page must contain [ type regexp here] that spits out
X" [string regexp blah blah]</p> aa_true "test X" [string regexp blah blah]</p>
</td> </td>
</tr><tr> </tr><tr>
<td>6</td><td> </td><td>A</td><td>Notification subscriptions are available for "email me whenever <td>6</td><td> </td><td>A</td><td>Notification subscriptions are available for "email me
this test fails" and "notify me whenever a test in this category whenever this test fails" and "notify me whenever a test
fails"</td> in this category fails"</td>
</tr><tr> </tr><tr>
<td>7</td><td> </td><td>A</td><td>The results of an automated test are optionally written to an <td>7</td><td> </td><td>A</td><td>The results of an automated test are optionally written to an
xml file.</td> xml file.</td>
...@@ -162,5 +162,4 @@ started</a> ...@@ -162,5 +162,4 @@ started</a>
rightLink="" rightLabel="" rightTitle="" rightLink="" rightLabel="" rightTitle=""
homeLink="index" homeLabel="Home" homeLink="index" homeLabel="Home"
upLink="index" upLabel="Up"> upLink="index" upLabel="Up">
<center><a href="http://openacs.org/doc/requirements.html#comments">View comments
on this page at openacs.org</a></center> \ No newline at end of file
...@@ -27,4 +27,4 @@ Test Data ...@@ -27,4 +27,4 @@ Test Data
Package Version Package Version
5.0.0 5.0.0
etc etc
</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2543127"></a>References</h3></div></div><div></div></div><div class="itemizedlist"><ul type="disc"><li><p>Forum Posting: <a href="http://openacs.org/forums/message-view?message_id=150581" target="_top">tclwebtest with openacs-4/etc/install tests -- help getting started</a></p></li><li><p>Forum Posting: <a href="http://openacs.org/forums/message-view?message_id=153265" target="_top">Berlin bug bash proposal</a></p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="revisions-history"></a>Revision History</h3></div></div><div></div></div><div class="informaltable"><table cellspacing="0" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th><span class="strong">Document Revision #</span></th><th><span class="strong">Action Taken, Notes</span></th><th><span class="strong">When?</span></th><th><span class="strong">By Whom?</span></th></tr></thead><tbody><tr><td>1</td><td>Creation</td><td>17 Jan 2004</td><td>Joel Aufrecht</td></tr><tr><td>2</td><td>Updated with notes from chat meeting</td><td>21 Jan 2004</td><td>Joel Aufrecht</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="usage.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left">Usage </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> </td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/requirements.html#comments">View comments on this page at openacs.org</a></center></body></html> </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2543127"></a>References</h3></div></div><div></div></div><div class="itemizedlist"><ul type="disc"><li><p>Forum Posting: <a href="http://openacs.org/forums/message-view?message_id=150581" target="_top">tclwebtest with openacs-4/etc/install tests -- help getting started</a></p></li><li><p>Forum Posting: <a href="http://openacs.org/forums/message-view?message_id=153265" target="_top">Berlin bug bash proposal</a></p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="revisions-history"></a>Revision History</h3></div></div><div></div></div><div class="informaltable"><table cellspacing="0" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th><span class="strong">Document Revision #</span></th><th><span class="strong">Action Taken, Notes</span></th><th><span class="strong">When?</span></th><th><span class="strong">By Whom?</span></th></tr></thead><tbody><tr><td>1</td><td>Creation</td><td>17 Jan 2004</td><td>Joel Aufrecht</td></tr><tr><td>2</td><td>Updated with notes from chat meeting</td><td>21 Jan 2004</td><td>Joel Aufrecht</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="usage.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left">Usage </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> </td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a></body></html>
<property name="context">{/doc/acs-automated-testing {Automated Testing}} {Usage}</property> <property name="context">{/doc/acs-automated-testing {ACS Automated Testing}} {Usage}</property>
<property name="doc(title)">Usage</property> <property name="doc(title)">Usage</property>
<master> <master>
<include src="/packages/acs-core-docs/lib/navheader" <include src="/packages/acs-core-docs/lib/navheader"
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
Aufrecht</a> Aufrecht</a>
</p> </p>
OpenACS docs are written by the named authors, and may be edited by OpenACS docs are written by the named authors, and may be edited by
OpenACS documentation staff.</div><p>Here's the entire chain of code used to set up auto-rebuilding OpenACS documentation staff.</div><p>Here&#39;s the entire chain of code used to set up
servers on test.openacs.org</p><div class="itemizedlist"><ul type="disc"> auto-rebuilding servers on test.openacs.org</p><div class="itemizedlist"><ul type="disc">
<li> <li>
<p>The master server shows the status of all other servers. For <p>The master server shows the status of all other servers. For
test.openacs.org, it listens on port 80.</p><div class="orderedlist"><ol type="1"> test.openacs.org, it listens on port 80.</p><div class="orderedlist"><ol type="1">
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<th>Details</th> <th>Details</th>
</tr> </tr>
<tr> <tr>
<td><b>This server</b></td> <td><strong>This server</strong></td>
<td colspan="4" align="center"><a href="admin/">Automated Test Admin</a></td> <td colspan="4" align="center"><a href="admin/">Automated Test Admin</a></td>
</tr> </tr>
<multiple name="servers"> <multiple name="servers">
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<td style="background-color:yellow">@servers.error_total_count@</td> <td style="background-color:yellow">@servers.error_total_count@</td>
</if> </if>
<else> <else>
<td style="background-color:red"><b>@servers.error_total_count@</b></td> <td style="background-color:red"><strong>@servers.error_total_count@</strong></td>
</else> </else>
</else> </else>
<td style="white-space:nowrap"><a href="@servers.local_url@">More info</a></td> <td style="white-space:nowrap"><a href="@servers.local_url@">More info</a></td>
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
</ul> </ul>
</li> </li>
<li>Test failures <li>Test failures
<if @has_test_report_p@> <if @has_test_report_p;literal@ true>
<if @testcase_failures:rowcount@ eq 0> <if @testcase_failures:rowcount@ eq 0>
<i>none</i> <em>none</em>
</if> </if>
<else> <else>
<table> <table>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</else> </else>
</li> </li>
<li> <li>
<a href="@rebuild_url@" onclick="return confirm('Are you sure you want to wipe and rebuild this server?');">Rebuild this server now</a> <a href="@rebuild_url@" id="action-rebuild" class="button">Rebuild this server now</a>
</li> </li>
<li> <li>
<a href="@rebuild_log_url@">Rebuild log</a> <a href="@rebuild_log_url@">Rebuild log</a>
......
...@@ -30,6 +30,11 @@ set admin_login_url [export_vars -base "$service(url)/register/auto-login" {{ema ...@@ -30,6 +30,11 @@ set admin_login_url [export_vars -base "$service(url)/register/auto-login" {{ema
set rebuild_url [export_vars -base rebuild-server { { server $service(name) } }] set rebuild_url [export_vars -base rebuild-server { { server $service(name) } }]
set rebuild_log_url "/rebuild-$service(name).log" set rebuild_log_url "/rebuild-$service(name).log"
template::add_confirm_handler \
-id "action-rebuild" \
-message "Are you sure you want to wipe and rebuild this server?"
# Local variables: # Local variables:
# mode: tcl # mode: tcl
# tcl-indent-level: 4 # tcl-indent-level: 4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment