Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Test performance


4 Posts   491 Views


18 August 2011 at 9:49pm (Last edited: 18 August 2011 9:50pm), Core Development Team, 4 Posts

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 :)



19 August 2011 at 1:07pm Forum Moderator, 5511 Posts

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.


19 August 2011 at 1:15pm Core Development Team, 4 Posts

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!


19 August 2011 at 8:53pm Forum Moderator, 5511 Posts

FYI Documentation about running sqlite3 just for testing locally on