• Home
  • Raw
  • Download

Lines Matching +full:coverage +full:- +full:results

1 # Android code coverage instructions
3 These are instructions for collecting code coverage data for android
4 instrumentation and JUnit tests. For Clang(C++) code coverage refer to [clang coverage].
8 ## How JaCoCo coverage works
10 In order to use JaCoCo code coverage, we need to create build time pre-instrumented
14 ## How to collect coverage data
23 Now when building, pre-instrumented files will be created in the build directory.
25 2. Run tests, with option `--coverage-dir <directory>`, to specify where to save
27 `out/Debug/bin/run_chrome_junit_tests --coverage-dir /tmp/coverage`.
29 3. The coverage results of JUnit and instrumentation tests will be merged
32 ## How to generate coverage report
39 --format html \
40 --output-dir /tmp/coverage_report/ \
41 --coverage-dir /tmp/coverage/ \
42 --sources-json-dir out/Debug/ \
44 Then an index.html containing coverage info will be created in output directory:
47 [INFO] Loading execution data file /tmp/coverage/testTitle.exec.
48 [INFO] Loading execution data file /tmp/coverage/testSelected.exec.
49 [INFO] Loading execution data file /tmp/coverage/testClickToSelect.exec.
50 [INFO] Loading execution data file /tmp/coverage/testClickToClose.exec.
51 [INFO] Loading execution data file /tmp/coverage/testThumbnail.exec.
55 2. For XML and CSV reports, we need to specify `--output-file` instead of `--output-dir` since
59 --format xml \
60 --output-file /tmp/coverage_report/report.xml \
61 --coverage-dir /tmp/coverage/ \
62 --sources-json-dir out/Debug/ \
69 --format csv \
70 --output-file /tmp/coverage_report/report.csv \
71 --coverage-dir /tmp/coverage/ \
72 --sources-json-dir out/Debug/ \
74 3. If generating coverage and there are duplicate class files, as can happen
75 when generating coverage for downstream targets, use the
76 `--include-substr-filter` option to choose jars in the desired directory. Eg.
77 for generating coverage report for Clank internal repo
79 build/android/generate_jacoco_report.py --format html \
80 --output-dir /tmp/coverage_report/ --coverage-dir /tmp/coverage/ \
81 --sources-json-dir out/java_coverage/ \
82 --include-substr-filter obj/clank
85 [clang coverage]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/code_coverage.…