21281 Posts in 5729 Topics by 2600 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 335 Views |
-
Test performance

18 August 2011 at 9:49pm Last edited: 18 August 2011 9:50pm
I'm curious about how long a test should take to run, via /dev/tests -- if I set up a single test with a dummy assertion ($this->assertEquals(1, 1);) and run it by itself using /dev/tests/DummyTest in the browser, it takes about 20 seconds to run, though it reports the time taken as 8 seconds. Is that par for the course or is something messed up? And if tests should be running faster, does anyone know anything that might cause this sort of behaviour? I'd try it using sake but sake doesn't seem to work on windows, for me anyway.
Cheers for any help folks
Jeremy
-
Re: Test performance

19 August 2011 at 1:07pm
Test performance is really quite slow as SS rebuilds the database for each test suite to ensure a clean state and so as you can imagine, quite a bit of overhead. I tend to use the sqlite3 driver while running tests which cuts the speed down 60-80% for me.
-
Re: Test performance

19 August 2011 at 1:15pm
hey will how's it going
I'll look into sqlite. In the meantime I've just skipped the DB refresh, most of my tests aren't using it at this point so it's not affecting me. I'll enable it if I need it later. thanks for the answer!
-
Re: Test performance

19 August 2011 at 8:53pm
FYI Documentation about running sqlite3 just for testing locally on http://doc.silverstripe.org/sapphire/en/trunk/howto/phpunit-configuration#speeding-up-your-test-execution-with-the-sqlite3-module
| 335 Views | ||
|
Page:
1
|
Go to Top |


