468,249 Members | 1,494 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,249 developers. It's quick & easy.

Code coverage tools for PHP applications?

Hi all,

The database that our php applications are running on is getting a
major clean up. RI will be enforced, normalization and all that good
stuff.

Our QA department have a set of regression plans but I don't know how
complete they are. Neither do they :(

My idea would be to have them run through their plans on an application
and measure the percentage of the code covered. Then we will know where
we are.

This is a QA project, not a development task. I'm not going to be able
to have the developers put unit tests into their code. That's a
different battle.

We use PHP version 4.x.

Anything I have seen appears to be developer focused. I don't mind
doing a "compile" to instument the code, if that is required. Sorry I'm
from a c++ background.

Thanks for any responses,

Paddy

Mar 15 '06 #1
7 2805
pa********@gmail.com wrote:
Hi all,

The database that our php applications are running on is getting a
major clean up. RI will be enforced, normalization and all that good
stuff.

Our QA department have a set of regression plans but I don't know how
complete they are. Neither do they :(

My idea would be to have them run through their plans on an application
and measure the percentage of the code covered. Then we will know where
we are.

This is a QA project, not a development task. I'm not going to be able
to have the developers put unit tests into their code. That's a
different battle.

We use PHP version 4.x.

Anything I have seen appears to be developer focused. I don't mind
doing a "compile" to instument the code, if that is required. Sorry I'm
from a c++ background.

Thanks for any responses,

Paddy

Is there a specific question in there somewhere?

Leo
Mar 15 '06 #2
"My idea would be to have them run through their plans on an
application
and measure the percentage of the code covered. Then we will know where
we are."

What tool can I use to do this?

Mar 15 '06 #3
I use Dreamweaver 8 for my php apps.

Mar 16 '06 #4
On Wed, 15 Mar 2006 14:20:38 -0800, patrickmee wrote:
My idea would be to have them run through their plans on an application
and measure the percentage of the code covered. Then we will know where
we are.

This is a QA project, not a development task. I'm not going to be able
to have the developers put unit tests into their code. That's a
different battle.


Have a look at Xdebug[1] and see if it's appropriate for
your needs. It does have code coverage functions (which I use, but in
conjunction with unit tests), although you'll need to wrap the code in
xdebug_start_code_coverage() and xdebug_stop_code_coverage() calls, then
do something with xdebug_get_code_coverage() after stopping the code
coverage system.

If you're using Apache to serve PHP web apps, you may be able to do
something with .htaccess files or the server configuration and
use auto_prepend_file and auto_append_file to capture the required data,
then save it somewhere and analyse it later.

Adam

[1] http://xdebug.org/

--
Adam Harvey

To e-mail: don't make an example out of me!

Mar 16 '06 #5

<pa********@gmail.com> wrote in message
news:11*********************@j52g2000cwj.googlegro ups.com...
Hi all,

The database that our php applications are running on is getting a
major clean up.
Our QA department have a set of regression plans ...

My idea would be to have them run through their plans on an application
and measure the percentage of the code covered.


If you are looking for a production PHP test coverage tool,
see
http://www.semanticdesigns.com/Produ...tCoverage.html
--
Ira Baxter, CTO
www.semanticdesigns.com
Mar 18 '06 #6
In message <11*********************@j52g2000cwj.googlegroups. com>,
pa********@gmail.com writes
Our QA department have a set of regression plans but I don't know how
complete they are. Neither do they :(


Software Verification have Code Coverage, Performance Profiling and a
Flow Tracer available for PHP. Currently they are not on the website,
but they will be shown on the website within the next week (the site is
getting a redesign, so they won't show until the redesign is available,
which happens next week).

These tools do not require insertion of any code into your application
or the modification of any of your code. Currently the tools require
PHP5, but plans to support PHP4 are in place.

The Coverage and Performance tools both have command line support so
that you can integrate them with regression tests etc. All tools support
HTML and XML export and the Coverage tools supports the notion of
merging different test results to provide a merged result.

And of course, no need to modify your application to use the tools.

If you are interested in these tools but don't want to wait for the
redesign of the site, take a look at Python Coverage Validator, Python
Performance Validator and Python Bug Validator - the PHP versions are
identical except for the fact they work with PHP rather than Python.

http://www.softwareverify.com
http://www.softwareverify.com/python...tor/index.html
http://www.softwareverify.com/python...tor/index.html
http://www.softwareverify.com/python...tor/index.html

Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
Mar 19 '06 #7
In message <11*********************@j52g2000cwj.googlegroups. com>,
pa********@gmail.com writes
My idea would be to have them run through their plans on an application
and measure the percentage of the code covered. Then we will know where
we are.


PHP Coverage Validator will do what you want. Works with PHP 4 and PHP
5. No need to modify your application. Simply launch from PHP Coverage
Validator and the coverage results are calculated. GUI and command line
operation supported so that you can integrate into your regression
tests.

http://www.softwareverify.com/phpCov...tor/index.html

Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
Apr 27 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John J. Lee | last post: by
242 posts views Thread by James Cameron | last post: by
7 posts views Thread by Kai Zhu | last post: by
2 posts views Thread by Orin | last post: by
1 post views Thread by maralle.fakhereddin | last post: by
5 posts views Thread by ev | last post: by
24 posts views Thread by David | last post: by
2 posts views Thread by innes | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.