Re: Test coverage

From: Date: Wed, 27 May 2009 15:24:24 +0000
Subject: Re: Test coverage
References: 1 2  Groups: php.qa 
Request: Send a blank email to php-qa+get-65028@lists.php.net to get a copy of this message
Daniel Convissor wrote:
Hi Zoe: On Wed, May 27, 2009 at 08:50:28AM +0100, zoe wrote:
http://results.testfest.php.net/lcov_20090526/
    
Something is weird here. I'm looking at _dom_document_schema_validate() on line 1962 of http://results.testfest.php.net/lcov_20090526/ext/dom/document.c.gcov.html At the time that ran, I had seven tests in the NewYorkUG/ext/dom/tests directory of the repository for this function and that there were no other tests for it from the other user groups. The coverage output shows seven hits entering the function. Good. Now the oddities begin. The coverage is showing that one test reaches "Invalid Schema source" on line 1980. None of my initial seven tests did that at that time (though I just added two tests to cover it). Then it's saying the remaining six tests returning at the "Invalid Schema" warning on 2011. But at the time the test ran, only three of the tests should have reached there. DOMDocument_schemaValidate_basic.phpt and DOMDocument_schemaValidateSource_basic.phpt should have hit RETURN_TRUE on line 2030. DOMDocument_schemaValidate_error2.phpt should have hit RETURN_FALSE on line 2032. Right - I think I can see the explanation for these and it's another copying issue. Some of the DOM tests have failed in the test coverage run because I only copied the .phpt files from SVN. So, if there are *new* test dependencies (ie files which are not already in CVS) those tests woudl fail. I'll modify the copy script and re-run it overnight ... if that sounds like a reasonable explanation?
(Note: I fixed a bug in DOMDocument_schemaValidateSource_error2.phpt since that coverage output ran. I intended it to return on line 2032, but it was returning on line 2011.) Thanks, --Dan


« previous php.qa (#65028) next »