Permalink
Browse files

Display the total number of test passes and fails for the project

  • Loading branch information...
1 parent 33f9831 commit 1f00de375c88c86a2068893a6811447b4ff05322 @ginatrapani ginatrapani committed Jan 9, 2011
@@ -60,4 +60,10 @@
$controller_test->addTestCase(new TestOfTestAuthAPIController());
$controller_test->addTestCase(new TestOfRSSController());
$controller_test->addTestCase(new TestOfUpgradeController());
-$controller_test->run( new TextReporter());
+
+$tr = new TextReporter();
+$controller_test->run( $tr );
+if (isset($RUNNING_ALL_TESTS) && $RUNNING_ALL_TESTS) {
+ $TOTAL_PASSES = $TOTAL_PASSES + $tr->getPassCount();
+ $TOTAL_FAILURES = $TOTAL_FAILURES + $tr->getFailCount();
+}
@@ -41,4 +41,9 @@
$installer_tests->addTestCase(new WebTestOfInstallation());
$installer_tests->addTestCase(new WebTestOfUpgradeDatabase());
-$installer_tests->run( new TextReporter());
+$tr = new TextReporter();
+$installer_tests->run( $tr );
+if (isset($RUNNING_ALL_TESTS) && $RUNNING_ALL_TESTS) {
+ $TOTAL_PASSES = $TOTAL_PASSES + $tr->getPassCount();
+ $TOTAL_FAILURES = $TOTAL_FAILURES + $tr->getFailCount();
+}
@@ -46,4 +46,10 @@
$web_tests->addTestCase(new WebTestOfCaptchaImage());
$web_tests->addTestCase(new WebTestOfTwitterDashboard());
$web_tests->addTestCase(new WebTestOfPostDetailPage());
-$web_tests->run( new TextReporter());
+
+$tr = new TextReporter();
+$web_tests->run( $tr );
+if (isset($RUNNING_ALL_TESTS) && $RUNNING_ALL_TESTS) {
+ $TOTAL_PASSES = $TOTAL_PASSES + $tr->getPassCount();
+ $TOTAL_FAILURES = $TOTAL_FAILURES + $tr->getFailCount();
+}
@@ -69,4 +69,9 @@
$model_tests->addTestCase(new TestOfBackupMySQLDAO());
$model_tests->addTestCase(new TestOfFavoritePostMySQLDAO());
-$model_tests->run( new TextReporter());
+$tr = new TextReporter();
+$model_tests->run( $tr );
+if (isset($RUNNING_ALL_TESTS) && $RUNNING_ALL_TESTS) {
+ $TOTAL_PASSES = $TOTAL_PASSES + $tr->getPassCount();
+ $TOTAL_FAILURES = $TOTAL_FAILURES + $tr->getFailCount();
+}
@@ -83,4 +83,9 @@
$plugin_tests->addTestCase(new TestOfHelloThinkUpPluginConfigurationController());
$plugin_tests->addTestCase(new TestOfSmartyModiferLinkUsernames());
-$plugin_tests->run( new TextReporter());
+$tr = new TextReporter();
+$plugin_tests->run( $tr );
+if (isset($RUNNING_ALL_TESTS) && $RUNNING_ALL_TESTS) {
+ $TOTAL_PASSES = $TOTAL_PASSES + $tr->getPassCount();
+ $TOTAL_FAILURES = $TOTAL_FAILURES + $tr->getFailCount();
+}
View
@@ -31,6 +31,8 @@
require_once THINKUP_ROOT_PATH.'webapp/_lib/extlib/simpletest/mock_objects.php';
$RUNNING_ALL_TESTS = true;
+$TOTAL_PASSES = 0;
+$TOTAL_FAILURES = 0;
require_once THINKUP_ROOT_PATH.'tests/all_model_tests.php';
@@ -41,3 +43,8 @@
require_once THINKUP_ROOT_PATH.'tests/all_install_tests.php';
require_once THINKUP_ROOT_PATH.'tests/all_controller_tests.php';
+
+echo "
+Total ThinkUp test passes: ".$TOTAL_PASSES."
+Total ThinkUp test failures: ".$TOTAL_FAILURES."
+";

0 comments on commit 1f00de3

Please sign in to comment.