[Phpmyadmin-devel] Help: Selenium test code coverage

Michal Čihař michal at cihar.com
Fri Jul 4 09:30:30 CEST 2014


Dne Fri, 4 Jul 2014 11:29:20 +0530
Smita <kumarismita62 at gmail.com> napsal(a):

> I wrote the selenium test for code written to automate normalization to
> 1NF. Here is the pull request[0]. I was expecting the code coverage
> reported by coverall will increase at least 1 to 2% but it didn't. Means
> selenium test doesn't increase coverage ? May be because it seems to cover
> only the behaviour of the system.

The coverage reporting in PHPUnit with Selenium was quite broken, so
I've disabled it. If it's now working, we can try enabling that (maybe
reverting 2a99cac and e3e0f33 will be enough, but that needs some

> If it is the case then how to cover the code segments which interact with
> database ?
> Is there a way to write test cases for codes interacting with databases
> using normal phpUnit framework ?

You can mock the DBI (see eg.

	Michal Čihař | http://cihar.com | http://phpmyadmin.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20140704/7d3e7b26/attachment.sig>

More information about the Developers mailing list