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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Test performance


Go to End


4 Posts   1125 Views

Avatar
JeremyW

Core Development Team, 4 Posts

18 August 2011 at 9:49pm

Edited: 18/08/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

Avatar
Willr

Forum Moderator, 5523 Posts

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.

Avatar
JeremyW

Core Development Team, 4 Posts

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!

Avatar
Willr

Forum Moderator, 5523 Posts

19 August 2011 at 8:53pm