qa:testcoverage
Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
qa:testcoverage [2008/04/30 19:44] – created zoe | qa:testcoverage [2008/04/30 19:53] – Create page of instructions on how to get coverage figs zoe | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== How to look at the test coverage for an extension - eg /ext/dom ==== | ==== How to look at the test coverage for an extension - eg /ext/dom ==== | ||
- | * Make sure that you have LTP installed | + | |
- | * sudo apt-get install ltp (on Ubuntu) | + | * sudo apt-get install ltp |
* sudo apt-get install lcov | * sudo apt-get install lcov | ||
+ | === Checkout the PHP53 code and build it === | ||
+ | * Checkout or download PHP53 into directory of your choice (in my case / | ||
+ | * cd / | ||
+ | * ./buildconf | ||
+ | * ./configure --enable-gcov | ||
+ | * make | ||
+ | |||
+ | === Check the coverage of a single extension === | ||
+ | * make a new directory somewhere (eg / | ||
+ | * create a script (run_coverage) file to run the tests, eg | ||
+ | < | ||
+ | export TEST_PHP_EXECUTABLE=/ | ||
+ | $TEST_PHP_EXECUTABLE / | ||
+ | </ | ||
+ | * ./ | ||
+ | * lcov --directory / | ||
+ | * genhtml dom.info -o dom_coverage. This will make a directory called dom_coverage with html coverage files in it. | ||
+ | * View the coverage files :-) |
qa/testcoverage.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1