Running PHP TestCase

Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")

Moderator: General Moderators

Post Reply
indiavitus
Forum Newbie
Posts: 5
Joined: Wed Sep 01, 2010 5:23 am

Running PHP TestCase

Post by indiavitus »

Hi,

I am running my php testcase, with set of some assertion.
At the point where any assertion got failed, system do not check for other following assertions.

How can I make sure all assertion get executed and gives the entire result.

Thanks,
Manoj
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Running PHP TestCase

Post by josh »

its called "stop on failure". What testing framework are you using? It matters. I recommend to leave it 'on'. If you can fail in 5 seconds instead of 50 that is better. Why get only 70-ish test runs per hour when you can get 500 test runs per hour. That is the meaning of "being agile". The sooner the tests fail, the less time you're wasting waiting for a test run to complete

The common response to this is "when i change functionality at a low level of abstraction 1,000 different tests break, and I need to see all of them to figure out what broke".

The response to this pitfall is to run the tests that test the thing you are changing. Once you've made your change and that class's tests pass, then run the tests for the rest of the system. Always in "stop on failure" mode. This is the best advice I can give you to maximize your benefit from testing.
Post Reply