# add github PR test coverage integration

**URL:** <https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851>\
**Category:** Development\
**Tags:** module, testing\
**Created:** [September 1, 2016, 8:14am UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851 "2016-09-01T08:14:39Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [September 1, 2016, 8:14am UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/1 "2016-09-01T08:14:39Z")

</div>

Hi there!

I would like to see more modules having github PR integration for unit test coverage.

I use coveralls for the radiology module [https://coveralls.io/github/openmrs/openmrs-module-radiology?branch=master](https://coveralls.io/github/openmrs/openmrs-module-radiology?branch=master) it gets the test coverage reports sent from travis CI after every build. On coveralls you can configure that the build should fail if the PR lowers the test coverage by x percent. This makes it clear to every contributor that he’s missing some tests 😉

Am wondering if there is a plan to do that or what the general opinion about that is?

I would be willing to make a start and add that to the legacyui module.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [September 1, 2016, 8:23am UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/2 "2016-09-01T08:23:41Z")

</div>

I personally have no objection to this, especially for the community supported modules. More so that you are even willing to go ahead and do it! 😄

---

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [September 2, 2016, 8:41am UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/3 "2016-09-02T08:41:56Z")

</div>

made a start at [https://issues.openmrs.org/browse/LUI-96](https://issues.openmrs.org/browse/LUI-96) see changes [https://github.com/openmrs/openmrs-module-legacyui/pull/59](https://github.com/openmrs/openmrs-module-legacyui/pull/59)

what is left to be done is that the repo needs to be added to coveralls. at the moment the build passes, coverage report is generated and coveralls plugin tries to send them but cannot because the repo is not added to [coveralls.io](http://coveralls.io). see [https://travis-ci.org/openmrs/openmrs-module-legacyui/builds/157034521#L4336](https://travis-ci.org/openmrs/openmrs-module-legacyui/builds/157034521#L4336)

so someone would need to add the repo to coveralls. I am not authorized. please help 🙂

is there or should there be a github user for such integrations ?

because in the radiology module I was able to add the repo to coveralls with my personal github user. guess because I have more permission on radiology module.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [September 2, 2016, 1:05pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/4 "2016-09-02T13:05:44Z")

</div>

@teleivo you now have admin permissions for the legacyui module. Can you try again? 🙂

---

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [September 2, 2016, 2:24pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/5 "2016-09-02T14:24:17Z")

</div>

thanks, it worked. see updated PR and coveralls 🙂

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [September 2, 2016, 2:31pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/6 "2016-09-02T14:31:22Z")

</div>

Yes it works like a charm! Thank you so much! 😄

---

<div class="post-metadata">

**Author:** ![wyclif](https://talk.openmrs.org/user_avatar/talk.openmrs.org/wyclif/32/19607_2.png) [@wyclif](https://talk.openmrs.org/u/wyclif)\
**Post date:** [September 16, 2016, 1:36pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/7 "2016-09-16T13:36:23Z")

</div>

Looks good to me

---

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [September 19, 2016, 2:06pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/8 "2016-09-19T14:06:39Z")

</div>

@dkayiwa can you please enable coverage on [https://coveralls.io/github/openmrs](https://coveralls.io/github/openmrs) for the webservice.rest module?

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [September 19, 2016, 2:40pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/9 "2016-09-19T14:40:54Z")

</div>

Can you cross check if i have done it correctly? You know this is my first time. 😄

---

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [September 19, 2016, 2:42pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/10 "2016-09-19T14:42:49Z")

</div>

project is there, so thats good 🙂 I think we just need to wait for the next merged PR for it to get reports from travis CI. but it should work!!

---

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [October 9, 2016, 10:03am UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/11 "2016-10-09T10:03:03Z")

</div>

hi fans of tested software 💾

I would love to see openmrs have test coverage integrated on github PRs. looking at [https://ci.openmrs.org/sonar/dashboard/index/1865](https://ci.openmrs.org/sonar/dashboard/index/1865) coverage could be better and it would definitely become better if its more visible to every contributor and prevent untested code from being merged. hope you agree!

I would create and work on the ticket if you like happy ☀ day

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [October 9, 2016, 10:25am UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/12 "2016-10-09T10:25:48Z")

</div>

@teleivo am 100% sure that no one is going disagree! So just go ahead and get jiggy with it! 😄

---

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [October 9, 2016, 12:57pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/13 "2016-10-09T12:57:39Z")

</div>

there is actually a very old “ready for work” ticket for this

> <https://issues.openmrs.org/browse/TRUNK-1916>

I just claimed it 🙂

---

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [October 9, 2016, 7:49pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/14 "2016-10-09T19:49:45Z")

</div>

Can you please enable openmrs-core on [coverals.io](http://coverals.io) thank youuuu 😁

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [October 9, 2016, 7:53pm UTC](https://talk.openmrs.org/t/add-github-pr-test-coverage-integration/7851/15 "2016-10-09T19:53:47Z")

</div>

Done. Thanks for following this up! 🙂
