views:

86

answers:

2

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.

Thanks

A: 

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.

Alister Bulman
In my hosted environment, that setting is locked.
Allain Lalonde
+1  A: 

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.

MDCore
Because I think running them in the context in which they will run is the best way of checking that there are fewer gotchas.
Allain Lalonde
Ok, I'll think about how to solve your stated problem now :)
MDCore