onaio/android-p2p

Fix coverage drop introduced by UI / UX enhancements

Opened this issue · 0 comments

  • Get coverage to >70%
  • Fix issue causing coveralls not to include coverage for compose tests

These issues are linked to PR #59

Troubleshooting
A github action was added to upload the test artifacts.

  • name: Upload Jacoco artifacts
    uses: actions/upload-artifact@v3
    with:
    name: test-artifacts
    path: |
    p2p-lib/build/reports/
    p2p-lib/build/outputs/unit_test_code_coverage/
    p2p-lib/build/outputs/code_coverage/
    p2p-lib/build/outputs/androidTest-results/
    It emerged that the p2p-lib/build/outputs/code_coverage/ was not being generated, which is the reason that the instrumented (compose) test coverage is not reported by Jacoco.

Potential fix
After running only compose tests and disabling ANDROIDX_TEST_ORCHESTRATOR option in the build.gradle file compose test coverage was uploaded

We hit the github actions billing limit before testing whether this fix works when both unit and instrumented tests were enabled.

Next steps

  • Run CI build next time the billing limit is reset to see whether the above fix worked for the combined test suite
  • Remove the action for uploading the test artifacts