Jump to:

23375 Posts in 18175 Topics by 2866 members

General Questions

SilverStripe Forums » General Questions » Test performance

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

Page: 1
Go to End
Author Topic: 468 Views
  • JeremyW
    Avatar
    Core Development Team
    4 Posts

    Test performance Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Test performance Link to this post

    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.

  • JeremyW
    Avatar
    Core Development Team
    4 Posts

    Re: Test performance Link to this post

    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!

  • Willr
    Avatar
    Forum Moderator
    5489 Posts
    468 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.