openmrs-core test coverage dropped after moving to github action


I noticed that the test coverage of openmrs-core is reported to be around 10% by coveralls after being at around 65%. You can see a nice history of the test coverage at openmrs/openmrs-core | Coveralls - Test Coverage History & Statistics

I am pretty sure it’s because we run only the integration tests as you can see here

I remember we had this issue when running/reporting the test coverage from Travis CI. See issue/fix from then Keep test results for reporting coverage · openmrs/openmrs-core@02eab6a · GitHub

@ibacher do you know why we only run the integration tests in the build step?

1 Like

I have just added back the running of the other tests. That was a very good catch @teleivo!


Thanks for the catch. That was an error on my part. The pattern I was following was to install dependencies and then build the project. I really should’ve had three steps there:

  1. Install dependencies
  2. Build and test the project
  3. Run the integration tests

But there’s no reason 2 & 3 can’t be done at the same time.

1 Like

I think there are :slightly_smiling_face:

If we run them separately instead of sequentially

  • we can run them in parallel, making test runs faster.
  • if some unit tests fail, we would also see if an integration test fails. This helps a developer fix all tests before pushing again.

Collecting the aggregate code coverage might be more involved than before though.