473,382 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 3033
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John J. Lee | last post by:
Anybody know of one? Actually, I have a feeling that emacs understands a standard format for errors, which would make it really easy to implement this by having the coverage tool print results...
242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
7
by: Kai Zhu | last post by:
Can anybody show me a list of such tools so that I can pick up the tools match my requirement.
2
by: Orin | last post by:
Hi, I have a problem in using coverage.py module in my project: ../cov -c Traceback (most recent call last): File "./cov", line 10, in ? coverage.the_coverage.command_line(sys.argv) File...
1
by: maralle.fakhereddin | last post by:
I am wondering if anyone knows of a good code coverage tool for ASP.Net applications? I already looked at NCover, ANTS profiler and am evaluating AQtime at the moment. Any help would be great....
2
by: Noah | last post by:
I'm trying to use the trace module to build coverage files for a multi-threaded program. http://docs.python.org/lib/module-trace.html I test my application using trace.py from the command-line...
5
by: ev | last post by:
Hello, We are looking for any testing tool that is capable of checking code coverage for C,C ++ and Java code. Or at least for C and C++. We want to know how much (percentage) of our code written...
24
by: David | last post by:
Hi list. What strategies do you use to ensure correctness of new code? Specifically, if you've just written 100 new lines of Python code, then: 1) How do you test the new code? 2) How do...
2
by: innes | last post by:
I can't find anything on this in the VS2008 help (searching for 'coverage' returns no results). Can anyone confirm that VS2008's code coverage functionality doesnt extend to working on C++/CLI...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.