[TIP] Code Coverage Functional testing

Florian Bruhin me at the-compiler.org
Mon Oct 5 22:54:44 PDT 2015

* Khashayar Delrooz <khashayar at yahoo.com> [2015-10-06 05:09:20 +0000]:
> Hi,I would like to measure my functional testing for code coverage. 
> I have some Selenium automated test cases that I would like to run
> against our application and measure the code coverage.  Can I use
> the Phython code coverage for this purpose?  I have used the code
> coverage for our unit tests, don't know how to use it for the
> functional tests.
> https://pypi.python.org/pypi/coverage

Sure, coverage can run anything python can run, i.e. you can also just
use it with a simple script for example:

    $ echo 'pass' > foo.py
    $ coverage run foo.py
    $ coverage report

    Name     Stmts   Miss  Cover
    foo.py       1      0   100%

How to run it with your selenium tests really depends on how you run
them exactly (though I'm not familiar with selenium).


http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20151006/773279e8/attachment.pgp>

More information about the testing-in-python mailing list