I have an application written in PHP using the Laravel framework.
And I have a test suite consisting of approximately 200 phpUnit test methods.
The problem I have is that this test suite is taking a painfully long time to run (~10 mins), and has also now started running out of memory on our test server.
I could adjust the max memory in php.ini to solve the latter issue, but that's not really the point: I shouldn't have to -- I don't want to have to allocate 500mb or a gig to a single PHP process. (because, you know, the server might need to do other stuff at the same time)
I've done some investigation, and it seems like the main reason that it's so slow and uses so much RAM is because it sets up a whole new Laravel environment for every test.
That's understandable, but I'm looking for ways to cut it down - either the memory usage or the time taken, or better yet both.
Can anyone suggest ways of streamlining my code or my tests that will help with this?
Thank you.