From 3ac8fbaa6179ab30c6e16e59d8b5b6dd27cda0a2 Mon Sep 17 00:00:00 2001 From: kai-morich Date: Fri, 26 Mar 2021 20:40:57 +0100 Subject: [PATCH] Updated Device Tests & Coverage Report (markdown) --- Device-Tests-&-Coverage-Report.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Device-Tests-&-Coverage-Report.md b/Device-Tests-&-Coverage-Report.md index b6a35ba..b1076dc 100644 --- a/Device-Tests-&-Coverage-Report.md +++ b/Device-Tests-&-Coverage-Report.md @@ -62,17 +62,19 @@ Note: with enabled ``testCoverageEnabled true`` the test fails or creates an emp Enable ``testCoverageEnabled true`` and for each **device** *flavor* defined in ``coverage.gradle`` execute the corresponding gradle task *usb-serial-for-android -> usbSerialForAndroid -> verification -> create***Device***DebugCoverageReport* or *usb-serial-for-android -> usbSerialForAndroid -> other -> create***Device***DebugAndroidTestCoverageReport*. -Both tasks create the required __*.ec__ report files but html reports do not contain annotated source code. +Both tasks create the required __*.ec__ and __*.xml__ report files but html reports do not contain annotated source code. Test reports are created even if tests fail. Nevertheless you should check that it didn't fail completely. -## Local coverage report +## Create coverage report -With gradle task *usb-serial-for-android -> usbSerialForAndroid -> other -> jacocoTestReport* you can create a summary report that also includes annotated source code. +Create summary __*.xml__ report with gradle task *usb-serial-for-android -> usbSerialForAndroid -> other -> jacocoTestReport*. This also creates a local __*.html__ report with annotated source code. ## Upload coverage report -Upload coverage reports to [codecov.io](https://codecov.io/gh/mik3y/usb-serial-for-android) using the bash uploader. On Windows execute in ``Git Bash`` - +Upload coverage reports to [codecov.io](https://codecov.io/gh/mik3y/usb-serial-for-android) using the bash uploader. On Windows execute in ``Git Bash``, e.g. + + cd /c/work/AndroidStudioProjects/usb-serial-for-android + ../codecov.sh -t -f usbSerialForAndroid/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml