oppia / oppia-android

A free, online & offline learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
311 stars 514 forks source link

Fix part of #5343: Generate Code Coverage Report in HTML and MARKDOWN formats #5443

Closed Rd4dev closed 3 months ago

Rd4dev commented 3 months ago

Explanation

Fixes part of #5343

Project

[PR 1.5 of Project 4.1]

Changes Made

This PR introduces the CoverageReporter utility to generate the code coverage report. The main features and changes include:

Essential Checklist

For UI-specific PRs only

If your PR includes UI-related changes, then:

Rd4dev commented 3 months ago

Hey @BenHenning, just wanted to clear 2 main things up at the start.

1. MARKDOWN report format:

The .md report as I assume it to be most useful for CI runs, containing essential result data about the percentage of covered code, and can be added as a comment. This base template was discussed in our meeting notes.

Total coverage:
Files covered: (# changed / # run with coverage)
Coverage percentage: ##% covered / ##% expected
LOC: # covered / # instrumented

(indent left) Specific coverage:
app/src/.../app
home
HomeActivity.kt - 87% (110/115)
...
...

The current Markdown report follows this foundational format and now appears as:

Coverage Report

Total coverage:

Probably simplifying it to Line coverage: 19 / 19 covered, Function coverage: 7 / 11 covered, Branch 2 / 2 covered

I would like to know if any additional details that should be included in the report for local generation.


2. Path to Store Reports

Variable Path Definitions Across Different OS

Windows users typically use absolute paths like C:/Users/..., whereas in WSL, paths are like /mnt/c/Users. So if we direct developers to use an absolute path, would this cause any confusion, and probably would it need to be handled in our file creation processes.

Providing and Handling Different Kinds of Paths

Subpaths and Endless/Long Chains

I just don't know, if this is a simple process and its just something that I complicate thinking of weird possibilities and approaches

Just stuck to something simple on both ends for now

I've implemented a solution based on these considerations, but it deviates from our previous discussions. I'm seeking your feedback to refine and adjust as necessary.

So basically, I just made it simple to not get developers input itself and make use of the filePath argument and create a dir coverage_reports in the repoRoot, based on the HTML or MARKDOWN arg

so for a command -

bazel run //scripts:run_coverage -- $(pwd) utility/src/main/java/org/oppia/android/util/parser/math/MathModel.kt HTML
// it would be
reportOutputPath: oppia-android/coverage_reports/utility/src/main/java/org/oppia/android/util/parser/math/MathModel/coverage.html

and for

bazel run //scripts:run_coverage -- $(pwd) app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsActivity.kt MARKDOWN
// it would be
reportOutputPath: oppia-android/coverage_reports/app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsActivity/coverage.md

(Even this feels like a train)

Would it be possible to clear this up, if we can just proceed this way or should taking inputs from developers/users be mandatory?

github-actions[bot] commented 3 months ago

APK & AAB differences analysis

Note that this is a summarized snapshot. See the CI artifacts for detailed differences.

Dev

Expand to see flavor specifics ### Universal APK APK file size: 16 MiB (old), 16 MiB (new), **0 bytes** (No change) APK download size (estimated): 14 MiB (old), 14 MiB (new), **10 bytes** (Added) Method count: 221791 (old), 221791 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 6550 (old), 6550 (new), **0** (No change) - Anim: 49 (old), 49 (new), **0** (No change) - Animator: 20 (old), 20 (new), **0** (No change) - Array: 15 (old), 15 (new), **0** (No change) - Attr: 915 (old), 915 (new), **0** (No change) - Bool: 10 (old), 10 (new), **0** (No change) - Color: 911 (old), 911 (new), **0** (No change) - Dimen: 994 (old), 994 (new), **0** (No change) - Drawable: 373 (old), 373 (new), **0** (No change) - Id: 1206 (old), 1206 (new), **0** (No change) - Integer: 37 (old), 37 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 368 (old), 368 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - Raw: 2 (old), 2 (new), **0** (No change) - String: 805 (old), 805 (new), **0** (No change) - Style: 816 (old), 816 (new), **0** (No change) - Xml: 6 (old), 6 (new), **0** (No change) Lesson assets: 105 (old), 105 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 15 MiB (old), 15 MiB (new), **0 bytes** (No change) APK download size (estimated): 14 MiB (old), 14 MiB (new), **6 bytes** (Added) #### Configuration hdpi APK file size: 59 KiB (old), 59 KiB (new), **0 bytes** (No change) APK download size (estimated): 23 KiB (old), 23 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 56 KiB (old), 56 KiB (new), **0 bytes** (No change) APK download size (estimated): 18 KiB (old), 18 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 53 KiB (old), 53 KiB (new), **0 bytes** (No change) APK download size (estimated): 18 KiB (old), 18 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 102 KiB (old), 102 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 67 KiB (old), 67 KiB (new), **0 bytes** (No change) APK download size (estimated): 28 KiB (old), 28 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 76 KiB (old), 76 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 79 KiB (old), 79 KiB (new), **0 bytes** (No change) APK download size (estimated): 39 KiB (old), 39 KiB (new), **0 bytes** (No change)
## Alpha
Expand to see flavor specifics ### Universal APK APK file size: 10 MiB (old), 10 MiB (new), **0 bytes** (No change) APK download size (estimated): 9150 KiB (old), 9150 KiB (new), **5 bytes** (Added) Method count: 99436 (old), 99436 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 105 (old), 105 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **0 bytes** (No change) APK download size (estimated): 9030 KiB (old), 9030 KiB (new), **5 bytes** (Added) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
## Beta
Expand to see flavor specifics ### Universal APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Removed) APK download size (estimated): 9135 KiB (old), 9135 KiB (new), **8 bytes** (Removed) Method count: 99436 (old), 99436 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 105 (old), 105 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **0 bytes** (No change) APK download size (estimated): 9019 KiB (old), 9019 KiB (new), **7 bytes** (Added) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
## Ga
Expand to see flavor specifics ### Universal APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Removed) APK download size (estimated): 9136 KiB (old), 9136 KiB (new), **13 bytes** (Removed) Method count: 99436 (old), 99436 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 105 (old), 105 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Removed) APK download size (estimated): 9020 KiB (old), 9020 KiB (new), **0 bytes** (No change) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
Rd4dev commented 3 months ago

@BenHenning,

Update on progress:

Implemented a base html layout for code coverage (TODO: still doesn't have computations done to have a cumulative coverage representation)

The Approach:

The lcov genhtml generation produces coverage report with 2 views

  1. For Line Coverage
  2. For Functions

Line Coverage Screenshot (1396)

Function Coverage Screenshot (1397)

And as far as seen no branch coverage (yet to be tested with multiple targets)

So I wanted every detail to be in one single place so wanted to combine them like this base structure (derived from other coverage reports) Screenshot (1402)

This has 4 columns:

  1. For Line number
  2. For Branch coverage - provides hit count
  3. For Function execution coverage - provides execution count
  4. Actual source code

Am also thinking if we can include the actual function hit with the function names like the lcov genhtml function view did, either separately or right below the available html report.

Also, the coverage (representative color) is decided based on the cumulative coverage result of the line with line, branch and functions. So like Line Branch Function Coverage color
FULL FULL FULL GREEN
FULL FULL NONE YELLOW
FULL NONE NONE YELLOW
NONE FULL NONE YELLOW
NONE NONE NONE RED

This still needs a lot of formatting to be done. And for now the coverage representations are hardcoded.

But would like to get an approval on the html layout before proceeding.

Rd4dev commented 3 months ago

Edit: Sorry this is long, to just address your comments here is a shorter comment: https://github.com/oppia/oppia-android/pull/5443#issuecomment-2189264044

@BenHenning, to some extent I think we might be on the same page, but I just wanted to confirm with actually showing you what and how I intend to go with the overall flow of the project

M1 phase:

Scripts:

  1. RunCoverage.kt
  2. CoverageRunner.kt
  3. CoverageReporter.kt

Start:

  1. Developer runs the command to get coverage analysis for a certain file Developer inputs:
bazel run //scripts:run_coverage -- $(pwd) utility/src/main/java/org/oppia/android/util/parser/math/MathModel.kt HTML

Now the run_coverage scripts ie. RunCoverage.kt is triggered

  1. RunCoverage.kt Receives the file and checks if the file is exempted
    if yes
    then it skips coverage
    if no
    then 
    - it tries to map the file path to its respective test targets and returns a list of test targets

so for 1:1 mapping

utility/src/main/java/org/oppia/android/util/parser/math/MathModel.kt -> 
[//utility/src/test/java/org/oppia/android/util/parser/math:MathModelTest]

for many:1 mapping

app/src/main/java/org/oppia/android/app/home/HomeActivity.kt -> 
[//app:src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest,
//app:src/test/java/org/oppia/android/app/home/HomeActivityLocalTest]
  1. Run Coverage analysis asynchronously the list of test targets are passed to the CoverageRunner to runCoverageAnalysis asynchronously on the provided test targets and returns a CoverageReport for each test target separately The CoverageReport is the coverage data stored in proto for a single test target

we then collect it and make it as a list with the returned CoverageReport so now we would have a list of CoverageReports

the coverage reports would be like for 1:1 mapping (just for representation not acutal data)

[{
  bazel_test_target://utility/src/test/java/org/oppia/android/util/parser/math:MathModelTest,
  CoveredLine{line_number:2}
}]

for many:1 mapping (just for representation not acutal data)

[{
  bazel_test_target://app:src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest,
  CoveredLine{line_number:2}
 },
 {
  bazel_test_target://app:src/test/java/org/oppia/android/app/home/HomeActivityLocalTest,
  CoveredLine{line_number:3}
}]

I think until this there needs no huge change in the way it is implemented (except for proto data structure)


Now we have the list of coverage reports and the thing left to do is actually make it something useful by creating a .md or .html file So to do this we pass this list of coverage reports to the CoverageReporter.kt

  1. CoverageReporter.kt (Heads up: So for now the PR1.5 just provides implementation to generate reports for a single target 1:1 mapping targets But work needs to be done to figure out how we can get the combined reports for many:1 mapping.)

a. MD reports

I consider .md reports are mostly helpful for ci runs and .html reports for local development purposes

so in here the process flows like with the list of coverage reports we either send these list of coverage reports to generating html or generating md reports based on the input

for 1:1 mapping The md text is generated just with the one - coverage report and[0] and saved as md file to the output path.

for many:1 mapping (Haven't been implemented but the plan is) say for the coverage reports

[{
  bazel_test_target://app:src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest,
  CoveredLine{line_number:2}
 },
 {
  bazel_test_target://app:src/test/java/org/oppia/android/app/home/HomeActivityLocalTest,
  CoveredLine{line_number:3}
}]

Both are essentially going to have the same number of founds (as both are for same file)

coverage reports[0] had line 1: FULL, line 2: FULL, line 3: NONE, line 4: NONE
coverage reports[1] had line 1: NONE, line 2: FULL, line 3: FULL, line 4: NONE
(to be computed) so both should be computed to result in 
line 1: covered
line 2: covered
line 3: covered
line 4: not covered

and the combined result will be made as a md file and saved to the output path. so thereby we achieve the consolidated output

[M2 phase future]

This is something I still haven't tried but I am planning to do this to achieve the report generation of all the affected files in the ci run It would probably be derived from the unit test, compute affected test runs

So the plan is to return the actual md data like for file 1:

**Lines:** 1/1 covered

So when a CI run is started,

  1. We should 1st get the list of files that are changed
  2. We will pass the file names one by one to perform the regular code coverage analysis as done earlier in M1
  3. So it will return the actual md string as an output for that file

say file1:

**file_path:** /file1.kt

and this md will be saved in the ci run in a variable or in a log file

then again, the process continues for file 2

  1. We pass the file 2 to do coverage analysis
  2. Get its md string output

say file2:

**file_path:** /file2.kt

and this md will be added to the previous saved md string or log

so now the log / stored variable will look like

**file_path:** /file1.kt
**file_path:** /file2.kt

and probably by the end it will have all the md reports in one place and by the end of all ci runs on affected / changed files we will have a single md report in string variable or log, that can be uploaded as a comment

This is what I had in my mind for the entire process Hmm.. are there any conflicts?

b. HTML reports

As with .html, I assume this to be most useful with local developments and in the first Android CLAM meet we had discussions on this and decided to just have .html for just local development for now since I mentioned there might be few things to note on how to collate the entire html report and we decided to stick with just md for now as mentioned in M2 milestone PR 2.1

with HTML the flow will be the same as done with md reports

for 1:1 mapping The html file content is generated just with the one - coverage report and[0] and saved as .html file to the output path. And I am right now sticking with generating it to the path of $repoRoot/coverage_reports/..../coverage.html as for few reasons that was described in https://github.com/oppia/oppia-android/pull/5443#issuecomment-2186663348 And that might be changed later as required

For now I am trying to accumulate all line, branch and function coverage details But since you mentioned we can skip branch coverage, I am thinking of sticking with line and function coverages And for 1:1 mapping this should be straightforward of just mapping the coverage report data to appropriate representations and the result will look something like below (this is just line coverage, functions need to be added)

Screenshot (1407)

(this is yet to be implemented in PR 1.5) for many:1 mapping This will also be the same for md generation ie. There will be just one single file say $repoRoot/coverage_reports/HomeActivity/coverage.html (as both targets represent coverages for same file) and first a collective result of the lines covered and not need to be found, similar to md as,

coverage reports[0] had line 1: FULL, line 2: FULL, line 3: NONE, line 4: NONE
coverage reports[1] had line 1: NONE, line 2: FULL, line 3: FULL, line 4: NONE
(to be computed) so both should be computed to result in 
line 1: covered
line 2: covered
line 3: covered
line 4: not covered

and this will be same for functions coverage too, and the color of the coverage representation will look like -

Line Branch Function Coverage color
FULL FULL FULL GREEN
FULL FULL NONE YELLOW
FULL NONE NONE YELLOW
NONE FULL NONE YELLOW
NONE NONE NONE RED

and the combined result will be made as a html file and saved to the output path. so thereby we achieve the consolidated output

[No M2 phase for HTML]

But I can see in your comments you mentioning about M2 HTML genertions, if that is something we absolutely need... (I still need to figure that out then) would confirm that and may be look into that for M2

So this is just the entire high level flow of the entire project majorly on M1 details and a outline on M2, from the comments I sense the concerns on 2 main things

  1. many:1 report generation
  2. the final cumulative report generation for all affected files

Another concern on proto structure to have the covered file as list, that is actually something I too wanted to discuss on I just followed the pattern provided in the issue tracker

message CoverageReport {
  string bazel_test_target = 1; // The Bazel test target that was run.
  repeated CoveredFile covered_file = 2; // Files with some coverage in this report.
}

but felt irrelevant to how we are proceeding so I think we will need to remove that and have everything under CoverageReport itself.

I think these might address few of the concerns but would definitely need to know if the flow is the same as you think it should be and was the flow right and would like to hear and work on feedbacks.

Rd4dev commented 3 months ago

@BenHenning, Hmm... Okay the previous comment just looks like a novel sorry, may be in short to just address the comments,

M1 phase

We will basically have the list of CoverageReports in RunCoverage.kt that will be sent to generate reports to CoverageReporter.kt with the list, eg:

List of CoverageReport ->
[{
  bazel_test_target://app:src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest,
  CoveredLine{line_number:2}
 },
 {
  bazel_test_target://app:src/test/java/org/oppia/android/app/home/HomeActivityLocalTest,
  CoveredLine{line_number:3}
}]

we will need to generate a cummulative coverage data in the way like

coverage reports[0] had line 1: FULL, line 2: FULL, line 3: NONE, line 4: NONE
coverage reports[1] had line 1: NONE, line 2: FULL, line 3: FULL, line 4: NONE
(to be computed) so both should be computed to result in 
line 1: covered
line 2: covered
line 3: covered
line 4: not covered

and use this to data generate md or html reports and save them so thereby we achieve the consolidated output

M2 phase

The ci run will run this command for each affected file and the plan is to store each run's output md string to a variable or log and at the end upload the collective generated md string as a comment.

github-actions[bot] commented 3 months ago

APK & AAB differences analysis

Note that this is a summarized snapshot. See the CI artifacts for detailed differences.

Dev

Expand to see flavor specifics ### Universal APK APK file size: 16 MiB (old), 16 MiB (new), **0 bytes** (No change) APK download size (estimated): 14 MiB (old), 14 MiB (new), **15 bytes** (Added) Method count: 221791 (old), 221791 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 6550 (old), 6550 (new), **0** (No change) - Anim: 49 (old), 49 (new), **0** (No change) - Animator: 20 (old), 20 (new), **0** (No change) - Array: 15 (old), 15 (new), **0** (No change) - Attr: 915 (old), 915 (new), **0** (No change) - Bool: 10 (old), 10 (new), **0** (No change) - Color: 911 (old), 911 (new), **0** (No change) - Dimen: 994 (old), 994 (new), **0** (No change) - Drawable: 373 (old), 373 (new), **0** (No change) - Id: 1206 (old), 1206 (new), **0** (No change) - Integer: 37 (old), 37 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 368 (old), 368 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - Raw: 2 (old), 2 (new), **0** (No change) - String: 805 (old), 805 (new), **0** (No change) - Style: 816 (old), 816 (new), **0** (No change) - Xml: 6 (old), 6 (new), **0** (No change) Lesson assets: 105 (old), 105 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 15 MiB (old), 15 MiB (new), **4 bytes** (Added) APK download size (estimated): 14 MiB (old), 14 MiB (new), **28 bytes** (Added) #### Configuration hdpi APK file size: 59 KiB (old), 59 KiB (new), **0 bytes** (No change) APK download size (estimated): 23 KiB (old), 23 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 56 KiB (old), 56 KiB (new), **0 bytes** (No change) APK download size (estimated): 18 KiB (old), 18 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 53 KiB (old), 53 KiB (new), **0 bytes** (No change) APK download size (estimated): 18 KiB (old), 18 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 102 KiB (old), 102 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 67 KiB (old), 67 KiB (new), **0 bytes** (No change) APK download size (estimated): 28 KiB (old), 28 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 76 KiB (old), 76 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 79 KiB (old), 79 KiB (new), **0 bytes** (No change) APK download size (estimated): 39 KiB (old), 39 KiB (new), **0 bytes** (No change)
## Alpha
Expand to see flavor specifics ### Universal APK APK file size: 10 MiB (old), 10 MiB (new), **0 bytes** (No change) APK download size (estimated): 9150 KiB (old), 9150 KiB (new), **8 bytes** (Added) Method count: 99436 (old), 99436 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 105 (old), 105 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Removed) APK download size (estimated): 9030 KiB (old), 9030 KiB (new), **7 bytes** (Removed) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
## Beta
Expand to see flavor specifics ### Universal APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Removed) APK download size (estimated): 9135 KiB (old), 9135 KiB (new), **36 bytes** (Added) Method count: 99436 (old), 99436 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 105 (old), 105 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Removed) APK download size (estimated): 9019 KiB (old), 9019 KiB (new), **6 bytes** (Added) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
## Ga
Expand to see flavor specifics ### Universal APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Added) APK download size (estimated): 9136 KiB (old), 9136 KiB (new), **18 bytes** (Added) Method count: 99436 (old), 99436 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 105 (old), 105 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **0 bytes** (No change) APK download size (estimated): 9020 KiB (old), 9020 KiB (new), **23 bytes** (Added) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
BenHenning commented 3 months ago

I think we discussed what was left to do here in our meeting today @Rd4dev (and I conveyed that to @adhiamboperes separately). Please let me know if anything else is needed from here, otherwise I'm deferring to @adhiamboperes for reviews over the next ~1.5 days.

Rd4dev commented 3 months ago

Thanks @BenHenning, just one thing to confirm. Can I proceed with having the script itself set the default output storage path for the md and html files (as shown in the demo M1)?

The reasons are discussed here https://github.com/oppia/oppia-android/pull/5443#issuecomment-2186663348 But in-short, just for 2 things

  1. Handle different OS paths and ensure consistent file structure.
  2. Use a default directory for coverage reports to avoid overwriting.
Rd4dev commented 3 months ago

Update on progress:

For now, the entire logic is done for

1. Generating md reports

md report:

Coverage Report

2. Generating html reports

html report: Screenshot (1417)


html report 2: to represent fail cases Screenshot (1414)

TODO:

And things left to do are to add tests

adhiamboperes commented 3 months ago

Thanks @BenHenning, just one thing to confirm. Can I proceed with having the script itself set the default output storage path for the md and html files (as shown in the demo M1)?

The reasons are discussed here #5443 (comment) But in-short, just for 2 things

  1. Handle different OS paths and ensure consistent file structure.
  2. Use a default directory for coverage reports to avoid overwriting.

@Rd4dev, I think having the script set the path may be the more logical path here, so the developer doesn't have to figure this out.

Please let me know if you still have other open questions.

Rd4dev commented 3 months ago

@Rd4dev, I think having the script set the path may be the more logical path here, so the developer doesn't have to figure this out.

Please let me know if you still have other open questions.

Thanks @adhiamboperes, that clears up everything!

Also, as update: The logic and the report generation for this PR are done and tests for CoverageReporter are added only thing left is to update the test cases for RunCoverage. (each test runs are taking a bit of time to complete) Log:

INFO: From Testing //scripts/src/javatests/org/oppia/android/scripts/coverage:RunCoverageTest:
==================== Test output for //scripts/src/javatests/org/oppia/android/scripts/coverage:RunCoverageTest:
JUnit4 Test Runner
.
Time: 208.708

OK (1 test)

I will push them too once everything is tested and open this PR for review.

github-actions[bot] commented 3 months ago

APK & AAB differences analysis

Note that this is a summarized snapshot. See the CI artifacts for detailed differences.

Dev

Expand to see flavor specifics ### Universal APK APK file size: 16 MiB (old), 16 MiB (new), **4 bytes** (Added) APK download size (estimated): 14 MiB (old), 14 MiB (new), **10 bytes** (Removed) Method count: 227007 (old), 227007 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 6550 (old), 6550 (new), **0** (No change) - Anim: 49 (old), 49 (new), **0** (No change) - Animator: 20 (old), 20 (new), **0** (No change) - Array: 15 (old), 15 (new), **0** (No change) - Attr: 915 (old), 915 (new), **0** (No change) - Bool: 10 (old), 10 (new), **0** (No change) - Color: 911 (old), 911 (new), **0** (No change) - Dimen: 994 (old), 994 (new), **0** (No change) - Drawable: 373 (old), 373 (new), **0** (No change) - Id: 1206 (old), 1206 (new), **0** (No change) - Integer: 37 (old), 37 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 368 (old), 368 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - Raw: 2 (old), 2 (new), **0** (No change) - String: 805 (old), 805 (new), **0** (No change) - Style: 816 (old), 816 (new), **0** (No change) - Xml: 6 (old), 6 (new), **0** (No change) Lesson assets: 111 (old), 111 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 16 MiB (old), 16 MiB (new), **4 bytes** (Added) APK download size (estimated): 14 MiB (old), 14 MiB (new), **30 bytes** (Added) #### Configuration hdpi APK file size: 59 KiB (old), 59 KiB (new), **0 bytes** (No change) APK download size (estimated): 23 KiB (old), 23 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 56 KiB (old), 56 KiB (new), **0 bytes** (No change) APK download size (estimated): 18 KiB (old), 18 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 53 KiB (old), 53 KiB (new), **0 bytes** (No change) APK download size (estimated): 18 KiB (old), 18 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 102 KiB (old), 102 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 67 KiB (old), 67 KiB (new), **0 bytes** (No change) APK download size (estimated): 28 KiB (old), 28 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 76 KiB (old), 76 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 79 KiB (old), 79 KiB (new), **0 bytes** (No change) APK download size (estimated): 39 KiB (old), 39 KiB (new), **0 bytes** (No change)
## Alpha
Expand to see flavor specifics ### Universal APK APK file size: 10 MiB (old), 10 MiB (new), **4 bytes** (Added) APK download size (estimated): 9184 KiB (old), 9184 KiB (new), **33 bytes** (Removed) Method count: 101341 (old), 101341 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 111 (old), 111 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Added) APK download size (estimated): 9064 KiB (old), 9064 KiB (new), **47 bytes** (Removed) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
## Beta
Expand to see flavor specifics ### Universal APK APK file size: 10 MiB (old), 10 MiB (new), **0 bytes** (No change) APK download size (estimated): 9169 KiB (old), 9169 KiB (new), **20 bytes** (Added) Method count: 101341 (old), 101341 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 111 (old), 111 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Added) APK download size (estimated): 9053 KiB (old), 9053 KiB (new), **40 bytes** (Added) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
## Ga
Expand to see flavor specifics ### Universal APK APK file size: 10 MiB (old), 10 MiB (new), **0 bytes** (No change) APK download size (estimated): 9169 KiB (old), 9169 KiB (new), **7 bytes** (Added) Method count: 101341 (old), 101341 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 111 (old), 111 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **0 bytes** (No change) APK download size (estimated): 9053 KiB (old), 9053 KiB (new), **15 bytes** (Added) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
Rd4dev commented 3 months ago

@adhiamboperes, the PR 1.5 tasks are done.

As of now the reports are returning a pair of computed coverage ratio and the actual report text. And RunCoverage takes the report text and saves it to the output file (in location _coveragereports/.../coverage.md or .html)

M2 These report texts and computed coverage ratios are returned with the plan to make them useful in M2

  1. report text - to gather all the reports (failed) and upload them as a single comment
  2. computed coverage ratio - to check for minimum threshold to decide pass / fail case

with these plans, I have addressed the existing review comments, would it be possible to PTAL!

oppiabot[bot] commented 3 months ago

Unassigning @adhiamboperes since the review is done.

github-actions[bot] commented 3 months ago

APK & AAB differences analysis

Note that this is a summarized snapshot. See the CI artifacts for detailed differences.

Dev

Expand to see flavor specifics ### Universal APK APK file size: 16 MiB (old), 16 MiB (new), **0 bytes** (No change) APK download size (estimated): 14 MiB (old), 14 MiB (new), **11 bytes** (Added) Method count: 227007 (old), 227007 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 6550 (old), 6550 (new), **0** (No change) - Anim: 49 (old), 49 (new), **0** (No change) - Animator: 20 (old), 20 (new), **0** (No change) - Array: 15 (old), 15 (new), **0** (No change) - Attr: 915 (old), 915 (new), **0** (No change) - Bool: 10 (old), 10 (new), **0** (No change) - Color: 911 (old), 911 (new), **0** (No change) - Dimen: 994 (old), 994 (new), **0** (No change) - Drawable: 373 (old), 373 (new), **0** (No change) - Id: 1206 (old), 1206 (new), **0** (No change) - Integer: 37 (old), 37 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 368 (old), 368 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - Raw: 2 (old), 2 (new), **0** (No change) - String: 805 (old), 805 (new), **0** (No change) - Style: 816 (old), 816 (new), **0** (No change) - Xml: 6 (old), 6 (new), **0** (No change) Lesson assets: 111 (old), 111 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 16 MiB (old), 16 MiB (new), **4 bytes** (Removed) APK download size (estimated): 14 MiB (old), 14 MiB (new), **42 bytes** (Removed) #### Configuration hdpi APK file size: 59 KiB (old), 59 KiB (new), **0 bytes** (No change) APK download size (estimated): 23 KiB (old), 23 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 56 KiB (old), 56 KiB (new), **0 bytes** (No change) APK download size (estimated): 18 KiB (old), 18 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 53 KiB (old), 53 KiB (new), **0 bytes** (No change) APK download size (estimated): 18 KiB (old), 18 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 102 KiB (old), 102 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 67 KiB (old), 67 KiB (new), **0 bytes** (No change) APK download size (estimated): 28 KiB (old), 28 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 76 KiB (old), 76 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 79 KiB (old), 79 KiB (new), **0 bytes** (No change) APK download size (estimated): 39 KiB (old), 39 KiB (new), **0 bytes** (No change)
## Alpha
Expand to see flavor specifics ### Universal APK APK file size: 10 MiB (old), 10 MiB (new), **0 bytes** (No change) APK download size (estimated): 9184 KiB (old), 9184 KiB (new), **21 bytes** (Removed) Method count: 101341 (old), 101341 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 111 (old), 111 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **0 bytes** (No change) APK download size (estimated): 9064 KiB (old), 9064 KiB (new), **16 bytes** (Removed) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
## Beta
Expand to see flavor specifics ### Universal APK APK file size: 10 MiB (old), 10 MiB (new), **0 bytes** (No change) APK download size (estimated): 9169 KiB (old), 9169 KiB (new), **8 bytes** (Added) Method count: 101341 (old), 101341 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 111 (old), 111 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **0 bytes** (No change) APK download size (estimated): 9053 KiB (old), 9053 KiB (new), **4 bytes** (Added) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
## Ga
Expand to see flavor specifics ### Universal APK APK file size: 10 MiB (old), 10 MiB (new), **0 bytes** (No change) APK download size (estimated): 9169 KiB (old), 9169 KiB (new), **0 bytes** (No change) Method count: 101341 (old), 101341 (new), **0** (No change) Features: 2 (old), 2 (new), **0** (No change) Permissions: 6 (old), 6 (new), **0** (No change) Resources: 5504 (old), 5504 (new), **0** (No change) - Anim: 39 (old), 39 (new), **0** (No change) - Animator: 18 (old), 18 (new), **0** (No change) - Array: 14 (old), 14 (new), **0** (No change) - Attr: 879 (old), 879 (new), **0** (No change) - Bool: 8 (old), 8 (new), **0** (No change) - Color: 767 (old), 767 (new), **0** (No change) - Dimen: 722 (old), 722 (new), **0** (No change) - Drawable: 333 (old), 333 (new), **0** (No change) - Id: 1148 (old), 1148 (new), **0** (No change) - Integer: 32 (old), 32 (new), **0** (No change) - Interpolator: 11 (old), 11 (new), **0** (No change) - Layout: 327 (old), 327 (new), **0** (No change) - Menu: 1 (old), 1 (new), **0** (No change) - Mipmap: 1 (old), 1 (new), **0** (No change) - Plurals: 10 (old), 10 (new), **0** (No change) - String: 736 (old), 736 (new), **0** (No change) - Style: 457 (old), 457 (new), **0** (No change) - Xml: 1 (old), 1 (new), **0** (No change) Lesson assets: 111 (old), 111 (new), **0** (No change) ### AAB differences
Expand to see AAB specifics Supported configurations: - hdpi (same) - ldpi (same) - mdpi (same) - tvdpi (same) - xhdpi (same) - xxhdpi (same) - xxxhdpi (same) #### Base APK APK file size: 9 MiB (old), 9 MiB (new), **4 bytes** (Removed) APK download size (estimated): 9053 KiB (old), 9053 KiB (new), **9 bytes** (Removed) #### Configuration hdpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 22 KiB (old), 22 KiB (new), **0 bytes** (No change) #### Configuration ldpi APK file size: 52 KiB (old), 52 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration mdpi APK file size: 46 KiB (old), 46 KiB (new), **0 bytes** (No change) APK download size (estimated): 17 KiB (old), 17 KiB (new), **0 bytes** (No change) #### Configuration tvdpi APK file size: 90 KiB (old), 90 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xhdpi APK file size: 60 KiB (old), 60 KiB (new), **0 bytes** (No change) APK download size (estimated): 27 KiB (old), 27 KiB (new), **0 bytes** (No change) #### Configuration xxhdpi APK file size: 69 KiB (old), 69 KiB (new), **0 bytes** (No change) APK download size (estimated): 37 KiB (old), 37 KiB (new), **0 bytes** (No change) #### Configuration xxxhdpi APK file size: 71 KiB (old), 71 KiB (new), **0 bytes** (No change) APK download size (estimated): 38 KiB (old), 38 KiB (new), **0 bytes** (No change)
Rd4dev commented 3 months ago

Thanks for the review @adhiamboperes, addressed all the review comments and updated tests accordingly. Can you PTAL!

oppiabot[bot] commented 3 months ago

Unassigning @Rd4dev since a re-review was requested. @Rd4dev, please make sure you have addressed all review comments. Thanks!

adhiamboperes commented 3 months ago

@seanlip, could you PTAL? I have verified that @BenHenning's changes have been addressed.

oppiabot[bot] commented 3 months ago

Assigning @BenHenning for code owner reviews. Thanks!