diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml
index 992a7e86cb1..276f2841312 100644
--- a/.github/workflows/code_coverage.yml
+++ b/.github/workflows/code_coverage.yml
@@ -258,10 +258,10 @@ jobs:
evaluate_code_coverage_reports:
name: Evaluate Code Coverage Reports
runs-on: ubuntu-20.04
- needs: code_coverage_run
+ needs: [ check_unit_tests_completed, code_coverage_run ]
# The expression if: ${{ !cancelled() }} runs a job or step regardless of its success or failure while responding to cancellations,
# serving as a cancellation-compliant alternative to if: ${{ always() }} in concurrent workflows.
- if: ${{ !cancelled() }}
+ if: ${{ !cancelled() && needs.check_unit_tests_completed.result == 'success'}}
env:
CACHE_DIRECTORY: ~/.bazel_cache
steps:
@@ -311,12 +311,16 @@ jobs:
# Reference: https://github.community/t/127354/7.
check_coverage_results:
name: Check Code Coverage Results
- needs: [ compute_changed_files, code_coverage_run, evaluate_code_coverage_reports ]
+ needs: [ check_unit_tests_completed, compute_changed_files, code_coverage_run, evaluate_code_coverage_reports ]
# The expression if: ${{ !cancelled() }} runs a job or step regardless of its success or failure while responding to cancellations,
# serving as a cancellation-compliant alternative to if: ${{ always() }} in concurrent workflows.
if: ${{ !cancelled() }}
runs-on: ubuntu-20.04
steps:
+ - name: Check unit tests passed
+ if: ${{ needs.check_unit_tests_completed.result != 'success' }}
+ run: exit 1
+
- name: Check coverages passed
if: ${{ needs.compute_changed_files.outputs.can_skip_files != 'true' && needs.code_coverage_run.result != 'success' }}
run: exit 1
diff --git a/wiki/Oppia-Android-Code-Coverage.md b/wiki/Oppia-Android-Code-Coverage.md
index e5ed0479619..cf00f7e9e66 100644
--- a/wiki/Oppia-Android-Code-Coverage.md
+++ b/wiki/Oppia-Android-Code-Coverage.md
@@ -139,7 +139,7 @@ Coverage Analysis: **FAIL** :x:
| File | Coverage | Lines Hit | Status | Min Required |
|------|:--------:|----------:|:------:|:------------:|
-| MathTokenizer.kt
utility/src/main/java/org/oppia/android/util/math/MathTokenizer.kt | 94.26% | 197 / 209 | :white_check_mark: | 70% |
+| Pass.kt
utility/src/main/java/org/oppia/android/util/math/Pass.kt | 94.26% | 197 / 209 | :white_check_mark: | 70% |
### Exempted coverage
@@ -311,7 +311,19 @@ bazel run //scripts:run_coverage -- : Your root directory.
- : Files you want to generate coverage reports for.
-For example, to analyze coverage for the file MathTokenizer.kt, use the relative path:
+To get the relative path of a file:
+
+1. Navigate to the Project view on the left-hand side in Android Studio.
+2. Locate the file to analyze Code Coverage for.
+3. Right click the file and select Copy Path. To get the path relative to the root.
+
+Alternatively, the coverage report itself provides the relative paths. You can reveal this information by clicking on the drop-down that precedes the file name in the report.
+
+| File | Coverage | Lines Hit | Status | Min Required |
+|------|:--------:|----------:|:------:|:------------:|
+| MathTokenizer.kt
utility/src/main/java/org/oppia/android/util/math/MathTokenizer.kt | 94.26% | 197 / 209 | :white_check_mark: | 70% |
+
+To analyze coverage for the file MathTokenizer.kt, use the relative path:
```sh
bazel run //scripts:run_coverage -- $(pwd) utility/src/main/java/org/oppia/android/util/math/MathTokenizer.kt
diff --git a/wiki/Writing-tests-with-good-behavioral-coverage.md b/wiki/Writing-tests-with-good-behavioral-coverage.md
index 7a0aa5caebc..db50cfa83a6 100644
--- a/wiki/Writing-tests-with-good-behavioral-coverage.md
+++ b/wiki/Writing-tests-with-good-behavioral-coverage.md
@@ -1017,7 +1017,7 @@ Note: For more information on how to utilize the code coverage analysis tool, pl
## Testing a Single Outcome in Multiple Ways
-When testing a single outcome like a successful withdrawal, you can use multiple approaches to verify the if the balance is updated correctly. Here are different ways to ensure the single outcome of withdrawal was processed correctly, each following a distinct approach.
+When testing a single outcome, such as a successful withdrawal, you can use multiple approaches to verify if the balance is updated correctly. Here are different ways to ensure the single outcome of withdrawal was processed correctly, each following a distinct approach.
**a. To verify correctness of output:**