Re: TestFest, which tests to focus on?

From: Date: Mon, 21 Apr 2008 16:01:52 +0000
Subject: Re: TestFest, which tests to focus on?
References: 1 2  Groups: php.qa 
Request: Send a blank email to php-qa+get-64215@lists.php.net to get a copy of this message
Lukas Kahwe Smith wrote:
So, is there a way that I can check to see if my test really does cover that code before submitting it for review? I'm assuming the answer is no. :-)
No, but at least you see which parts are not executed. So with some basic knowledge of C you should be able to figure out what PHP functions to call to get those parts executed. As you can see from the front page, the actual test runs take quite a lot of time to run. Actually, I think there is a way, but Lukas is correct in that it's not easy :-). I have done this in the past by removing all the .phpt from the source tree except the ones I'm interested in, then building with gcov and using lcov to look at the coverage of my test (or set of tests) on their own.
I can put some instructions on the wiki (Lukas - anywhere in particular?) for Linux. I think it's quite a useful thing to be able to do. Zoe
regards, Lukas


« previous php.qa (#64215) next »