PHPUnit works great, I love it actually, problem I'm having is that my hosting plan imposes a 30 second cap on the duration of a query. If PHPUnit tests take longer than that, the connection is closed by the server, and I never get to find out if all my tests passed or not.

Is there an existing automatic way of running an arbitrarily long test suite using AJAX to batch unit tests so that they'd never hit the 30s threshold? As long as each individual test takes less than 30s I think it should work.


No correct solution


Why are you running the tests on the production server? Your tests are for running on your development server, to make sure your code is good before sending into production.

You may be able to change the default timeout with set_time_limit (link). That resets the time left to run whenever it's run.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow