New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate Code Coverage of Piwik test suite #4224
Comments
But not sure how/if it is possible to "merge" the code coverage from several phpunit executions? |
I've started to work on that ticket. There is a possibility to "merge" the code coverage. |
As far as I've seen coveralls requires some CI tool running, such as jenkins or travis. |
Wow very cool to hear you managed to build it with 3g of ram. code coverage will not run well on travis, and we cant run it on piwik.org as it would slow down services, maybe we could run this process in a large EC2 instance and shut it down after... would be cheap! |
@Steve, would it be possible to upgrade the codecoverage report from Nov 22 on 2.0.3 ? Here is an idea: maybe we could run the whole processus, once a day, generate the coverage at midnight. Maybe we can use the existing travis script to setup webserver+mysql etc. and upload results to codecoverage.piwik.org. Maybe we could run the script on AWS once a day? |
I'm currently having problems with running the UI tests. Setting up the fixtures always fail with Failed asserting that 'http://local/piwik/tests/PHPUnit/proxy/piwik.php?idsite=1&rec=1&apiv=1&r=795241&cip=156.5.3.2&_id=76c0cff81faceb99&cdt=2012-01-12+00%3A11%3A42&token_auth=c0e024d9200b5705bc4804722636378a&_idts=1389624137&_idvc=0&fla=1&java=1&dir=0&qt=0&realp=0&pdf=0&wma=0&gears=0&ag=0&h=12&m=34&s=6&res=1024x768&cookie=1&url=http%3A%2F%2Fexample.org%2Findex.htm%3Futm_campaign%3DGA+Campaign%26piwik_kwd%3DPiwik+kwd%26utm_term%3DGA+keyword+SHOULD+NOT+DISPLAY%23pk_campaign%3DNOT+TRACKED%21%21%26pk_kwd%3DNOT+TRACKED%21%21&urlref=' contains "_viewts=1302307497". Nevertheless - I'll try to commit the required files and write a small description how to setup/run the complete code coverage by the end of the week. |
@SteveG we have fixed this test error last week, maybe now it works fine for you too? |
…mode, as it is used to generate full code coverage
@sgiehl can this be closed now that coverage is enabled? 👍 |
Currently only directly called methods are covered by the report. So all methods called through the tracker/api proxy will not be included. It's not easy to do that. But there is a way, which costs much performance (and will exceed the travis resources). If we don't need that anymore. we can close this ticket. |
Kuddos @sgiehl for making it happen. hopefully more and more devs will in the future find useful improvements to testing thanks to these code coverage reports. |
It would be fantastic to know how much of the piwik platform source code is covered by tests. With our hundreds of unit tests, [integration tests, and http://piwik.org/blog/2013/10/our-latest-improvement-to-qa-screenshot-testing/ UI screenshot tests, we can hope for a reasonnable code coverage.
Access to code coverage report would help us find out if there are any parts of the code that are not tested at all, and it will help quantify the reach of our QA suite.
The text was updated successfully, but these errors were encountered: