Commit Graph

57 Commits

Author SHA1 Message Date
Ingo Schommer
bdd57f3e75 ENHANCEMENT: refactored runTests, using the new phpunit wrapper classes.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111041 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:51 +13:00
Sam Minnee
96294391e0 MINOR: Fix links etc, and remove www. from SS urls
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109105 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:46 +13:00
Sam Minnee
edeeb2f077 ENHANCEMENT: Added -v / --verbose option to dev/tests/*, to make it output every single test name before it starts that test.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109104 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:46 +13:00
Sam Minnee
22d9c1fb4e Added dev/tests/emptydb to clear out test session databases.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109099 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:45 +13:00
Ingo Schommer
34ec202c0d ENHANCEMENT Added TestRunner::$coverage_filter_dirs to exclude certain directories from PHPUnit test coverage reports
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106877 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:32 +13:00
Luke Hudson
4b9b1dd928 FEATURE: Add dev/tests/sessionloadyml to load a yml fixture into an existing test session
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104231 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:20 +13:00
Sean Harvey
bdb3af9177 BUGFIX #5136 Ensure $coverage argument to TestRunner::runTests() has a strict check before running coverage tests, as sometimes an SS_HTTPRequest object can be passed into this argument
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100415 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:45 +13:00
Luke Hudson
1caedebafe BUGFIX: Fix TestRunner coverage pattern to work as documented (Fixes QA scripts too)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100116 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:44 +13:00
Tom Rix
8a929e07a4 ENHANCEMENT you can now do coverage tests of single/multiple tests, or entire modules
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99954 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:43 +13:00
Sam Minnee
eba7aa8fc0 ENHANCEMENT: Removed dev/reset, instead encouraging the use of dev/tests/startsession for tests.
ENHANCEMENT: Let people use dev/tests/startsession without a fixture, instead calling requireDefaultRecords

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98080 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Sam Minnee
9ac547d32d BUGFIX: Don't rely on the current working directory for any file access; use BASE_PATH.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97728 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Sam Minnee
717a7c5062 ENHANCEMENT: Don't set up the test db if database tests aren't being run.
From: Sam Minnee <sam@silverstripe.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97583 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:14 +13:00
Sam Minnee
974b25920d MINOR: Don't use test manifest for dev/startsession and dev/endsession (from r93528) (from r94431)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94432 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:58 +13:00
Will Rossiter
f1a3e35fa1 MINOR: Tweak to test name display on the test runner
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94336 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:56 +13:00
Sam Minnee
599adc97b1 API CHANGE: Added dev/tests/build, which runs everything, meaning that dev/tests/all doesn't need to run PhpSyntaxTes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90059 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-23 03:06:59 +00:00
Sean Harvey
84c9f8efd0 BUGFIX Removed double up of classes in TestRunner::coverage() (from r88463)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89798 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-21 04:06:29 +00:00
Ingo Schommer
0cf75cfc65 MINOR Unified permission control for i18nTextCollectorTask, TaskRunner, TestRunner, ModelViewer, DevelopmentAdmin, TestViewer, MigrateTranslatableTask
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86005 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-10 01:49:56 +00:00
Sam Minnee
5829c86947 Made timing code for test runner more accurate (includes initial db build):
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84970 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-21 03:02:43 +00:00
Ingo Schommer
1f19dcdfad BUGFIX Fixed singleton() call in TestRunner?, it fails on PHP 5.2.5 with a ReflectionException? as it passes constructor arguments (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-16 23:56:36 +00:00
Ingo Schommer
54f8ece2e7 BUGFIX Checking for class_exists() when collating testable classes in TestRunner
ENHANCEMENT Removing space from TestRunner header output listing classnames, to make them easier to copy/paste into a custom test run command (which accepts comma-separated arguments, but has trouble with spaces)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80799 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-02 00:17:29 +00:00
Ingo Schommer
17c1d412eb ENHANCEMENT Allowing TestRunner? to skip certain tests through the ?SkipTests?=... GET paramete (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80646 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-30 22:35:46 +00:00
Ingo Schommer
504980ce4d ENHANCEMENT Allowing test runs per module (top-level folder), e.g. sake dev/tests/module/sapphire
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80645 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-30 22:30:33 +00:00
Sam Minnee
19c235a5bf BUGFIX #3433: Fixed test runner PHPUnit detection on an instance with trailing slashes in paths
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80215 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 06:29:12 +00:00
Sam Minnee
d8bb43ee0a MINOR ajshort: Added a space between the list of tests run so they can be broken up into multiple lines.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79569 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-18 09:34:19 +00:00
Tom Rix
e1f54bc394 MINOR syntax error in TestRunner.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77706 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 02:31:35 +00:00
Ingo Schommer
9c10166381 BUGFIX Failing in TestRunner->init() when PHPUnit is not present, not only in specific method invocations. Previously it was missing checks on only() method
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77704 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 02:29:05 +00:00
Sean Harvey
b20b6e0f95 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 06:36:16 +00:00
Ingo Schommer
b5bd96b07b ENHANCEMENT Running TestRunner tests suites alphabetically through natcasesort() instead of using the (relatively arbitrary) class ordering from ClassInfo::getSubclassesFor()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75793 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 23:52:55 +00:00
Ingo Schommer
228b976ce1 ENHANCEMENT Adding SapphireTest::set_up_once() and SapphireTest::tear_down_once() for better test performance with state that just needs to be initialized once per test case (not per test method). Added new SapphireTestSuite to support this through PHPUnit.
ENHANCEMENT Using set_up_once() in TranslatableTest and TranslatableSearchFormTest for better test run performance

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74941 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-22 03:22:09 +00:00
Ingo Schommer
2e109a27a5 ENHANCEMENT Allowing to run multiple tests comma-separated in TestRunner, e.g. through dev/tests/ObjectTest,DataObjectTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73886 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-31 19:42:08 +00:00
Sam Minnee
a581e748d9 ENHANCEMENT: Added dev/tests/cleanupdb action to remove test databases
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72463 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 07:31:23 +00:00
Andrew O'Neil
635e2c3df6 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72453 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 03:44:11 +00:00
Sean Harvey
d471bd4785 BUGFIX Ensure that TestRunner properly unsets the alternate database name (for temp databases) once the tests have finished
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71307 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 21:17:23 +00:00
Ingo Schommer
d26f08b481 MINOR merged branches/2.3 into trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@67465 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-04 22:38:32 +00:00
Sam Minnee
69d9521778 No execution time limit on test runner
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65530 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-10 05:06:23 +00:00
Ingo Schommer
c6be7af88f ENHANCEMENT Better CLI output for browsing dev/tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65464 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-09 15:34:29 +00:00
Sam Minnee
c1d6e82248 API CHANGE: Removed manifest's dependency on database, by removing hastable information [17:47:04]
dquote> API CHANGE: Deprecate ClassInfo::ready() in favour of Security::database_is_ready()
dquote> API CHANGE: Create DataObject::has_own_table() to determine whether a DataObject has a table without looking at it.
dquote> API CHANGE: Exclude /tests/ directories from the manifest entirely except when tests are being run.
dquote> API CHANGE: Added ?usetestmanifest=1 flag to access the test manifest outside of test execution.
dquote> API CHANGE: Simplified Core.php manifest include to just call ManifestBuilder::include_manifest() - manifest takes care of its own cache file

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65385 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-06 04:51:25 +00:00
Sam Minnee
f1f76b22b7 FEATURE: Flush template cache before running tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64444 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 19:48:12 +00:00
Ingo Schommer
9a298e1592 BUGFIX Limited error message scope on invalid classname for TestRunner
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64013 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 18:49:24 +00:00
Ingo Schommer
ad3f0f400f ENHANCEMENT Improved error message on invalid classname for TestRunner
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64012 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 18:43:22 +00:00
Ingo Schommer
9371f4688b ENHANCEMENT Introduced constants for system paths like /sapphire in preparation for a more flexible directory reorganisation. Instead of hardcoding your path, please use the following constants: BASE_PATH, BASE_URL, SAPPHIRE_DIR, SAPPHIRE_PATH, CMS_DIR, CMS_PATH, THIRDPARTY_DIR, THIRDPARTY_PATH, ASSETS_DIR, ASSETS_PATH, THEMES_DIR, THEMES_PATH
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63154 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-27 16:02:38 +00:00
Sam Minnee
b031c8ff8b Added status notifications to cli test runs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62912 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-23 03:22:13 +00:00
Sam Minnee
e9615040e1 ENHANCEMENT: Added dev/tests/startsession and dev/tests/endsession to allow the use of fixtures with external test frameworks, such as Windmill
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61627 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-27 08:19:46 +00:00
Sam Minnee
63224005f5 Fixed coverage reporting on test runner
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61461 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-25 01:41:58 +00:00
Sam Minnee
12868bab9f Added DatabaseAdmin::clearAllData() to empty out a database.
Improved performance of testrunner so that it doesn't create a new database for each test, instead only once per test run.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60597 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-13 02:47:14 +00:00
Sam Minnee
0bdc8fad81 Improve CLI use of Debugging tools and test execution.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60581 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-13 01:47:05 +00:00
Sam Minnee
9b7bf6a187 BUGFIX: Fixed test runner's handling of errors
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60410 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 06:10:59 +00:00
Ingo Schommer
382f34c69b (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60335 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 03:10:59 +00:00
Ingo Schommer
46bbde18e7 (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60261 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-10 23:03:35 +00:00
Ingo Schommer
4da0a2c52c removed duplicate RestfulServerTest files, they're already in /cms (merge error)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60236 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 07:12:12 +00:00