From 46a0b0471447c1be80ef77efa8bce04c05516e29 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Thu, 8 Aug 2024 01:33:53 +0000 Subject: [PATCH 1/3] Exempt targets incompatible with code coverage. PR description will contain much more context, but this also includes adding missing test declarations and some other fixes in existing code. --- .../domain/oppialogger/analytics/BUILD.bazel | 28 + scripts/assets/test_file_exemptions.textproto | 1290 ++++++++++++++--- .../android/scripts/common/BazelClient.kt | 36 +- .../scripts/coverage/CoverageRunner.kt | 21 +- .../android/scripts/coverage/RunCoverage.kt | 11 +- .../scripts/proto/script_exemptions.proto | 5 + .../android/scripts/common/BazelClientTest.kt | 54 +- .../scripts/coverage/CoverageRunnerTest.kt | 25 +- .../android/testing/robolectric/BUILD.bazel | 36 + .../oppia/android/util/logging/BUILD.bazel | 17 + .../oppia/android/util/profile/BUILD.bazel | 37 + .../profile/DirectoryManagementUtilTest.kt | 2 +- 12 files changed, 1306 insertions(+), 256 deletions(-) diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel index ecdc2be1dbf..3d8e5efdbfe 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel @@ -323,3 +323,31 @@ oppia_android_test( "//utility/src/main/java/org/oppia/android/util/networking:debug_module", ], ) + +oppia_android_test( + name = "FirestoreDataControllerTest", + srcs = ["FirestoreDataControllerTest.kt"], + custom_package = "org.oppia.android.domain.oppialogger.analytics", + test_class = "org.oppia.android.domain.oppialogger.analytics.FirestoreDataControllerTest", + test_manifest = "//domain:test_manifest", + deps = [ + "//:dagger", + "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:cpu_module", + "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:data_controller", + "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:prod_module", + "//testing", + "//testing/src/main/java/org/oppia/android/testing/data:data_provider_test_monitor", + "//testing/src/main/java/org/oppia/android/testing/logging:event_log_subject", + "//testing/src/main/java/org/oppia/android/testing/robolectric:test_module", + "//testing/src/main/java/org/oppia/android/testing/threading:test_coroutine_dispatchers", + "//testing/src/main/java/org/oppia/android/testing/threading:test_module", + "//testing/src/main/java/org/oppia/android/testing/time:test_module", + "//third_party:androidx_test_ext_junit", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + "//utility/src/main/java/org/oppia/android/util/locale:prod_module", + "//utility/src/main/java/org/oppia/android/util/networking:debug_module", + ], +) diff --git a/scripts/assets/test_file_exemptions.textproto b/scripts/assets/test_file_exemptions.textproto index 7ff7c89edd6..2ba7f6dc494 100644 --- a/scripts/assets/test_file_exemptions.textproto +++ b/scripts/assets/test_file_exemptions.textproto @@ -35,31 +35,31 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/activity/route/Route.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/activity/route/ActivityRouterModule.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/activity/route/RouteKey.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/activity/route/Route.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/AdministratorControlsActivityPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/activity/route/RouteKey.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/AdministratorControlsFragmentPresenter.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/AdministratorControlsActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/AdministratorControlsFragmentTestActivity.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/AdministratorControlsActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/AdministratorControlsFragmentTestActivityPresenter.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/AdministratorControlsFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/MathExpressionInteractionsViewTestActivity.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/AdministratorControlsFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { @@ -134,6 +134,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/administratorcontrolsitemviewmodel/AdministratorControlsProfileViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionActivityPresenter.kt" test_file_not_required: true @@ -150,6 +154,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/ControlButtonsViewModel.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/CopyIdMaterialButtonView.kt" test_file_not_required: true @@ -158,10 +166,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/DeviceIdItemViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdFragmentPresenter.kt" test_file_not_required: true @@ -174,10 +190,6 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileListViewModel.kt" test_file_not_required: true } -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/ControlButtonsViewModel.kt" - test_file_not_required: true -} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/administratorcontrols/learneranalytics/SyncStatusItemViewModel.kt" test_file_not_required: true @@ -215,11 +227,11 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/application/alpha/AlphaOppiaApplication.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/application/alpha/AlphaApplicationComponent.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/application/alpha/AlphaApplicationComponent.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/application/alpha/AlphaOppiaApplication.kt" test_file_not_required: true } test_file_exemption { @@ -234,12 +246,16 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/application/alphakenya/AlphaKenyaOppiaApplication.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/application/beta/BetaApplicationComponent.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/application/beta/BetaOppiaApplication.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/application/beta/BetaApplicationComponent.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/application/dev/DeveloperApplicationComponent.kt" test_file_not_required: true } test_file_exemption { @@ -247,7 +263,7 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/application/dev/DeveloperApplicationComponent.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/application/ga/GaApplicationComponent.kt" test_file_not_required: true } test_file_exemption { @@ -255,13 +271,17 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/application/ga/GaApplicationComponent.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/classroom/ClassroomListActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/classroom/ClassroomListActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/classroom/ClassroomListFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/classroom/ClassroomListFragmentPresenter.kt" test_file_not_required: true @@ -298,6 +318,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryItemViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivityPresenter.kt" test_file_not_required: true @@ -322,6 +346,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/customview/ContinueButtonView.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/customview/LessonThumbnailImageView.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/customview/OppiaCurveBackgroundView.kt" test_file_not_required: true @@ -342,6 +370,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/customview/interaction/FractionInputInteractionView.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/customview/interaction/MathExpressionInteractionsView.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/customview/interaction/NumericInputInteractionView.kt" test_file_not_required: true @@ -355,36 +387,16 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/AutomaticAppDeprecationNoticeDialogFragment.kt" - test_file_not_required: true -} -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/AutomaticAppDeprecationNoticeDialogFragmentPresenter.kt" - test_file_not_required: true -} -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/BetaNoticeClosedListener.kt" - test_file_not_required: true -} -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/BetaNoticeDialogFragmentPresenter.kt" - test_file_not_required: true -} -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/DeprecationNoticeExitAppListener.kt" - test_file_not_required: true -} -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/GeneralAvailabilityUpgradeNoticeClosedListener.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/DeveloperOptionsActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/GeneralAvailabilityUpgradeNoticeDialogFragmentPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/DeveloperOptionsActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/DeveloperOptionsActivityPresenter.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/DeveloperOptionsFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/DeveloperOptionsFragmentPresenter.kt" @@ -450,14 +462,26 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/devoptionsitemviewmodel/DeveloperOptionsOverrideAppBehaviorsViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/devoptionsitemviewmodel/DeveloperOptionsTestParsersViewModel.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/devoptionsitemviewmodel/DeveloperOptionsViewLogsViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeFragmentPresenter.kt" test_file_not_required: true @@ -482,10 +506,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/ChapterSummaryViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/MarkChaptersCompletedActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/MarkChaptersCompletedActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/MarkChaptersCompletedFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/MarkChaptersCompletedFragmentPresenter.kt" test_file_not_required: true @@ -506,10 +538,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/testing/MarkChaptersCompletedTestActivity.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markstoriescompleted/MarkStoriesCompletedActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markstoriescompleted/MarkStoriesCompletedActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markstoriescompleted/MarkStoriesCompletedFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markstoriescompleted/MarkStoriesCompletedFragmentPresenter.kt" test_file_not_required: true @@ -530,10 +570,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/markstoriescompleted/testing/MarkStoriesCompletedTestActivity.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/MarkTopicsCompletedActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/MarkTopicsCompletedActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/MarkTopicsCompletedFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/MarkTopicsCompletedFragmentPresenter.kt" test_file_not_required: true @@ -543,21 +591,29 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/testing/MarkTopicsCompletedTestActivity.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/TopicSelector.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/TopicSelector.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/TopicViewModel.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/TopicViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/testing/MarkTopicsCompletedTestActivity.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserFragmentPresenter.kt" test_file_not_required: true @@ -575,13 +631,17 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/testing/ViewEventLogsTestActivity.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/ViewEventLogsActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/ViewEventLogsActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/ViewEventLogsFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/ViewEventLogsFragmentPresenter.kt" test_file_not_required: true @@ -590,6 +650,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/ViewEventLogsViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/testing/ViewEventLogsTestActivity.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/drawer/ExitProfileDialogFragment.kt" test_file_not_required: true @@ -662,10 +726,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/fragment/InjectableFragment.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/HelpActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/HelpActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/HelpFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/HelpFragmentPresenter.kt" test_file_not_required: true @@ -679,11 +751,11 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/help/HelpViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/HelpListViewModel.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/help/HelpListViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/HelpViewModel.kt" test_file_not_required: true } test_file_exemption { @@ -722,6 +794,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/faq/FAQListActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/faq/FAQListFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/faq/FAQListFragmentPresenter.kt" test_file_not_required: true @@ -746,6 +822,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/faq/faqItemViewModel/FAQItemViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/faq/faqsingle/FAQSingleActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/faq/faqsingle/FAQSingleActivityPresenter.kt" test_file_not_required: true @@ -754,10 +834,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseItemViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseListActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseListActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseListFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseListFragmentPresenter.kt" test_file_not_required: true @@ -767,15 +855,23 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseTextViewerActivityPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseTextViewModel.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseTextViewerFragmentPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseTextViewerActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseTextViewerActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseTextViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseTextViewerFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/LicenseTextViewerFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { @@ -790,10 +886,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/ThirdPartyDependencyItemViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/ThirdPartyDependencyListActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/ThirdPartyDependencyListActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/ThirdPartyDependencyListFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/help/thirdparty/ThirdPartyDependencyListFragmentPresenter.kt" test_file_not_required: true @@ -806,6 +910,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/hintsandsolution/ExpandedHintListIndexListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/hintsandsolution/HintViewModel.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionDialogFragment.kt" test_file_not_required: true @@ -826,10 +934,6 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionViewModel.kt" test_file_not_required: true } -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/hintsandsolution/HintViewModel.kt" - test_file_not_required: true -} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/hintsandsolution/ReturnToLessonViewModel.kt" test_file_not_required: true @@ -851,13 +955,17 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path:"app/src/main/java/org/oppia/android/app/hintsandsolution/ViewSolutionInterface.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/hintsandsolution/ViewHintListener.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path:"app/src/main/java/org/oppia/android/app/hintsandsolution/ViewHintListener.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/hintsandsolution/ViewSolutionInterface.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/home/HomeActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/home/HomeActivityPresenter.kt" test_file_not_required: true @@ -898,6 +1006,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/home/UserAppHistoryViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/home/WelcomeViewModel.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/home/classroomlist/ClassroomSummaryClickListener.kt" test_file_not_required: true @@ -922,6 +1034,14 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/home/promotedlist/PromotedStoryListView.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/home/promotedlist/PromotedStoryListViewModel.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/home/promotedlist/PromotedStoryViewModel.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/home/recentlyplayed/PromotedStoryClickListener.kt" test_file_not_required: true @@ -942,6 +1062,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedFragmentPresenter.kt" test_file_not_required: true @@ -966,6 +1090,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/home/topiclist/TopicSummaryClickListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/home/topiclist/TopicSummaryViewModel.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/mydownloads/DownloadsTabFragment.kt" test_file_not_required: true @@ -982,6 +1110,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsFragmentPresenter.kt" test_file_not_required: true @@ -1003,110 +1135,111 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/DeprecationNoticeActionListener.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/AutomaticAppDeprecationNoticeDialogFragment.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/AutomaticAppDeprecationNoticeDialogFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/BetaNoticeClosedListener.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentPresenter.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/BetaNoticeDialogFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/BetaNoticeDialogFragmentTestActivity.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/BetaNoticeDialogFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/ForcedAppDeprecationNoticeDialogFragmentTestActivity.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/DeprecationNoticeActionListener.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/GeneralAvailabilityUpgradeNoticeDialogFragmentTestActivity.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/DeprecationNoticeExitAppListener.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/OptionalAppDeprecationNoticeDialogFragmentTestActivity.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/OsDeprecationNoticeDialogFragmentTestActivity.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboadingSlideViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/GeneralAvailabilityUpgradeNoticeClosedListener.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingActivityPresenter.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/GeneralAvailabilityUpgradeNoticeDialogFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/GeneralAvailabilityUpgradeNoticeDialogFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenterV1.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingNavigationListener.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingSlideFinalViewModel.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingViewPagerViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/BetaNoticeDialogFragmentTestActivity.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/RouteToProfileListListener.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/ForcedAppDeprecationNoticeDialogFragmentTestActivity.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/ViewPagerSlide.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/GeneralAvailabilityUpgradeNoticeDialogFragmentTestActivity.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeActivityPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/OptionalAppDeprecationNoticeDialogFragmentTestActivity.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeFragmentPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/notice/testing/OsDeprecationNoticeDialogFragmentTestActivity.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileActivityPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/AudioLanguageFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragmentPresenter.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileViewModel.kt" - test_file_not_required: true -}test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroActivityPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroFragmentPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileActivityPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { @@ -1116,77 +1249,178 @@ test_file_exemption { test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileViewModel.kt" test_file_not_required: true -}test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroActivityPresenter.kt" - test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroFragmentPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/CreateProfileViewModel.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/AudioLanguageFragmentPresenter.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicItemViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListActivityPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListFragment.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListFragmentPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/IntroFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageActivityPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboadingSlideViewModel.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageFragmentPresenter.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageRadioButtonListener.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageItemViewModel.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageSelectionViewModel.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageActivityPresenter.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenterV1.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageFragmentPresenterV1.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingNavigationListener.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageItemViewModel.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageRadioButtonListener.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageSelectionViewModel.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeFragmentPresenter.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingSlideFinalViewModel.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingViewModel.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/OnboardingViewPagerViewModel.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/RouteToProfileListListener.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/onboarding/ViewPagerSlide.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicItemViewModel.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListActivityPresenter.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListFragment.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListFragmentPresenter.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListViewModel.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageActivityPresenter.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageFragmentPresenter.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageItemViewModel.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageRadioButtonListener.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AppLanguageSelectionViewModel.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageActivityPresenter.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageFragmentPresenterV1.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageItemViewModel.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageRadioButtonListener.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/AudioLanguageSelectionViewModel.kt" + test_file_not_required: true } test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/options/LoadAppLanguageListListener.kt" @@ -1204,6 +1438,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/OptionsActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/options/OptionsActivityPresenter.kt" test_file_not_required: true @@ -1216,6 +1454,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/options/OptionsAudioLanguageViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/OptionsFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/options/OptionsFragmentPresenter.kt" test_file_not_required: true @@ -1228,10 +1470,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/options/OptionsReadingTextSizeViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/ReadingTextSizeActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/options/ReadingTextSizeActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/options/ReadingTextSizeFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/options/ReadingTextSizeFragmentPresenter.kt" test_file_not_required: true @@ -1260,14 +1510,26 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/options/TextSizeRadioButtonListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/parser/FractionParsingUiError.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/parser/StringToNumberParser.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/parser/StringToRatioParser.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/audio/AudioButtonListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/player/audio/AudioFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/audio/AudioFragmentPresenter.kt" test_file_not_required: true @@ -1296,6 +1558,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/audio/LanguageInterface.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/player/exploration/BottomSheetOptionsMenu.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/exploration/BottomSheetOptionsMenuItemClickListener.kt" test_file_not_required: true @@ -1304,6 +1570,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/exploration/DefaultFontSizeStateListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivityPresenter.kt" test_file_not_required: true @@ -1356,10 +1626,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/state/DragDropSortInteractionView.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/player/state/ImageRegionSelectionInteractionView.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/state/SelectionInteractionView.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/player/state/StateFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/state/StateFragmentPresenter.kt" test_file_not_required: true @@ -1536,6 +1814,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/state/testing/StateFragmentTestViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/player/stopplaying/ProgressDatabaseFullDialogFragment.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/player/stopplaying/RestartPlayingSessionListener.kt" test_file_not_required: true @@ -1545,25 +1827,29 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/player/stopplaying/ProgressDatabaseFullDialogFragment.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/player/stopplaying/StopStatePlayingSessionListener.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/player/stopplaying/UnsavedExplorationDialogFragment.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/player/stopplaying/StopStatePlayingSessionWithSavedProgressListener.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/player/stopplaying/StopStatePlayingSessionListener.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/player/stopplaying/UnsavedExplorationDialogFragment.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/player/stopplaying/StopStatePlayingSessionWithSavedProgressListener.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/policies/PoliciesActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/policies/PoliciesActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/policies/PoliciesFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/policies/PoliciesFragmentPresenter.kt" test_file_not_required: true @@ -1572,6 +1858,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/policies/RouteToPoliciesListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/AddProfileActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/AddProfileActivityPresenter.kt" test_file_not_required: true @@ -1580,6 +1870,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/AddProfileViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/AdminAuthActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt" test_file_not_required: true @@ -1592,6 +1886,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/AdminAuthViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/AdminPinActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt" test_file_not_required: true @@ -1612,6 +1910,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/AdminSettingsViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/PinPasswordActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/PinPasswordActivityPresenter.kt" test_file_not_required: true @@ -1628,6 +1930,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/ProfileChooserActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/ProfileChooserFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/ProfileChooserFragmentPresenter.kt" test_file_not_required: true @@ -1656,6 +1962,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profile/RouteToAdminPinListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureActivityPresenter.kt" test_file_not_required: true @@ -1676,10 +1986,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureEditDialogFragment.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressFragmentPresenter.kt" test_file_not_required: true @@ -1708,6 +2026,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/profileprogress/RouteToOngoingTopicListListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/recyclerview/BindableAdapter.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/recyclerview/DividerItemDecorator.kt" test_file_not_required: true @@ -1728,10 +2050,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/recyclerview/StartSnapHelper.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonFragmentPresenter.kt" test_file_not_required: true @@ -1744,6 +2074,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/LoadProfileEditDeletionDialogListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditActivityPresenter.kt" test_file_not_required: true @@ -1768,10 +2102,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileListActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileListActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileListFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileListFragmentPresenter.kt" test_file_not_required: true @@ -1780,10 +2122,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileListViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentPresenter.kt" test_file_not_required: true @@ -1792,10 +2142,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentPresenter.kt" test_file_not_required: true @@ -1836,13 +2194,17 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/shim/ViewComponentFactory.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/splash/SplashActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/splash/SplashActivityPresenter.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/story/ExplorationSelectionListener.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/spotlight/SpotlightFragment.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/spotlight/SpotlightManager.kt" @@ -1860,10 +2222,22 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/spotlight/SpotlightTarget.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/story/ExplorationSelectionListener.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/story/StoryActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/story/StoryActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/story/StoryFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/story/StoryFragmentPresenter.kt" test_file_not_required: true @@ -1900,14 +2274,34 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SelectedAnswerAvailabilityReceiver.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyFragmentPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyMultipleChoiceOptionView.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyNpsItemOptionView.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragment.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragmentPresenter.kt" test_file_not_required: true @@ -1949,15 +2343,11 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyMultipleChoiceOptionView.kt" - test_file_not_required: true -} -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyNpsItemOptionView.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/AdministratorControlsFragmentTestActivity.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragment.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/AdministratorControlsFragmentTestActivityPresenter.kt" test_file_not_required: true } test_file_exemption { @@ -2016,10 +2406,22 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ConceptCardFragmentTestActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/DragDropTestActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/DragDropTestActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/DragDropTestFragment.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/DragDropTestFragmentPresenter.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/DrawableBindingAdaptersTestActivity.kt" test_file_not_required: true @@ -2036,6 +2438,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ExplorationTestActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/FractionInputInteractionViewTestActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/HomeFragmentTestActivity.kt" test_file_not_required: true @@ -2060,14 +2466,6 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ImageRegionSelectionTestFragment.kt" test_file_not_required: true } -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/DragDropTestFragmentPresenter.kt" - test_file_not_required: true -} -test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/DragDropTestFragment.kt" - test_file_not_required: true -} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ImageRegionSelectionTestFragmentPresenter.kt" test_file_not_required: true @@ -2076,6 +2474,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ImageViewBindingAdaptersTestActivity.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/InputInteractionViewTestActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/LessonThumbnailImageViewTestActivity.kt" test_file_not_required: true @@ -2092,6 +2494,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/MarginBindingAdaptersTestActivity.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/MathExpressionInteractionsViewTestActivity.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/NavigationDrawerTestActivity.kt" test_file_not_required: true @@ -2108,6 +2514,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ProfileChooserFragmentTestActivity.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ProfileChooserFragmentTestActivityPresenter.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ProfileEditFragmentTestActivity.kt" test_file_not_required: true @@ -2117,8 +2527,8 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ProfileChooserFragmentTestActivityPresenter.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/RatioInputInteractionViewTestActivity.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/SplashTestActivity.kt" @@ -2144,10 +2554,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/StateAssemblerPaddingBindingAdaptersTestActivity.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/TestFontScaleConfigurationUtilActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/TestFontScaleConfigurationUtilActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/TextInputInteractionViewTestActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/TextViewBindingAdaptersTestActivity.kt" test_file_not_required: true @@ -2164,10 +2582,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/TopicTestActivity.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/TopicTestActivityForStory.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/ViewBindingAdaptersTestActivity.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/testing/activity/TestActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/RouteToConceptCardListener.kt" test_file_not_required: true @@ -2188,10 +2614,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/RouteToStoryListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/TopicActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/TopicActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/TopicFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt" test_file_not_required: true @@ -2208,6 +2642,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/ViewPagerAdapter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragmentPresenter.kt" test_file_not_required: true @@ -2220,6 +2658,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/conceptcard/ConceptCardViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/info/TopicInfoFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/info/TopicInfoFragmentPresenter.kt" test_file_not_required: true @@ -2252,6 +2694,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/lessons/TopicLessonViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/lessons/TopicLessonsFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentPresenter.kt" test_file_not_required: true @@ -2268,6 +2714,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/practice/SubtopicSelector.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/practice/TopicPracticeFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/practice/TopicPracticeFragmentPresenter.kt" test_file_not_required: true @@ -2304,6 +2754,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/questionplayer/HintsAndSolutionQuestionManagerListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityPresenter.kt" test_file_not_required: true @@ -2324,6 +2778,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/revision/RevisionSubtopicSelector.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/revision/TopicRevisionFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/revision/TopicRevisionFragmentPresenter.kt" test_file_not_required: true @@ -2340,10 +2798,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/revisioncard/ReturnToTopicClickListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityPresenter.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardFragmentPresenter.kt" test_file_not_required: true @@ -2380,6 +2846,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/translation/AppLanguageApplicationInjectorProvider.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/translation/AppLanguageResourceHandler.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/translation/testing/ActivityRecreatorTestModule.kt" test_file_not_required: true @@ -2397,12 +2867,12 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/utility/lifecycle/LifecycleSafeTimerFactory.kt" + exempted_file_path: "app/src/main/java/org/oppia/android/app/utility/OnClickableAreaClickedListener.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "app/src/main/java/org/oppia/android/app/utility/OnClickableAreaClickedListener.kt" - test_file_not_required: true + exempted_file_path: "app/src/main/java/org/oppia/android/app/utility/RatioExtensions.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/utility/RegionClickEvent.kt" @@ -2416,6 +2886,18 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/utility/TextInputEditTextHelper.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/utility/datetime/DateTimeUtil.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/utility/lifecycle/LifecycleSafeTimerFactory.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/utility/math/MathExpressionAccessibilityUtil.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/view/ViewComponent.kt" test_file_not_required: true @@ -2448,6 +2930,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/viewmodel/ObservableViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/WalkthroughActivity.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/WalkthroughActivityListener.kt" test_file_not_required: true @@ -2476,6 +2962,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/end/WalkthroughEndPageChanger.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/end/WalkthroughFinalFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/end/WalkthroughFinalFragmentPresenter.kt" test_file_not_required: true @@ -2492,6 +2982,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/topiclist/WalkthroughTopicItemViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/topiclist/WalkthroughTopicListFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/topiclist/WalkthroughTopicListFragmentPresenter.kt" test_file_not_required: true @@ -2508,6 +3002,10 @@ test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/topiclist/topiclistviewmodel/WalkthroughTopicSummaryViewModel.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/welcome/WalkthroughWelcomeFragment.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "app/src/main/java/org/oppia/android/app/walkthrough/welcome/WalkthroughWelcomeFragmentPresenter.kt" test_file_not_required: true @@ -2600,6 +3098,14 @@ test_file_exemption { exempted_file_path: "data/src/main/java/org/oppia/android/data/backends/gae/model/GaeUserSuppliedFeedback.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/audio/AudioPlayerController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/audio/CellularAudioDialogController.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstance.kt" test_file_not_required: true @@ -2620,6 +3126,10 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/auth/FirebaseUserWrapper.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/AnswerClassificationController.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/ClassificationContext.kt" test_file_not_required: true @@ -2660,6 +3170,22 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/RuleQualifiers.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/algebraicexpressioninput/AlgebraicExpressionInputIsEquivalentToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/algebraicexpressioninput/AlgebraicExpressionInputMatchesExactlyWithRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/algebraicexpressioninput/AlgebraicExpressionInputMatchesUpToTrivialManipulationsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/algebraicexpressioninput/AlgebraicExpressionInputModule.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/continueinteraction/ContinueModule.kt" test_file_not_required: true @@ -2672,50 +3198,250 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXBeforeElementYClassifierProvider.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasDenominatorEqualToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasFractionalPartExactlyEqualToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasIntegerPartEqualToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasNoFractionalPartRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasNumeratorEqualToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToAndInSimplestFormRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsExactlyEqualToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsGreaterThanRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsLessThanRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/imageClickInput/ImageClickInputIsInRegionRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/imageClickInput/ImageClickInputModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputContainsAtLeastOneOfRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputEqualsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputIsProperSubsetOfRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/mathequationinput/MathEquationInputIsEquivalentToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/mathequationinput/MathEquationInputMatchesExactlyWithRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/mathequationinput/MathEquationInputMatchesUpToTrivialManipulationsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/mathequationinput/MathEquationInputModule.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/multiplechoiceinput/MultipleChoiceInputEqualsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/multiplechoiceinput/MultipleChoiceInputModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEqualToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEquivalentToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsRuleModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericexpressioninput/NumericExpressionInputIsEquivalentToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericexpressioninput/NumericExpressionInputMatchesExactlyWithRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericexpressioninput/NumericExpressionInputMatchesUpToTrivialManipulationsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericexpressioninput/NumericExpressionInputModule.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputEqualsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanOrEqualToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsInclusivelyBetweenRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanOrEqualToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsWithinToleranceRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputRuleModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputEqualsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasNumberOfTermsEqualToClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasSpecificTermEqualToRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputIsEquivalentRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/textinput/TextInputContainsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/textinput/TextInputEqualsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/textinput/TextInputFuzzyEqualsRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/textinput/TextInputRuleModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/rules/textinput/TextInputStartsWithRuleClassifierProvider.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classroom/ClassroomController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/devoptions/ModifyLessonProgressController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/devoptions/ShowAllHintsAndSolutionController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/ExplorationActiveTimeController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/ExplorationDataController.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/ExplorationProgress.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/ExplorationProgressController.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/ExplorationProgressListener.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/ExplorationProgressModule.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/ExplorationRetriever.kt" test_file_not_required: true @@ -2724,10 +3450,18 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/ExplorationRetrieverImpl.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/ExplorationStorageModule.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/TimerSessionState.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/lightweightcheckpointing/ExplorationCheckpointController.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/exploration/lightweightcheckpointing/ExplorationStorageDatabaseSize.kt" test_file_not_required: true @@ -2736,6 +3470,10 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/feedbackreporting/FeedbackReportingModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/feedbackreporting/ReportSchemaVersion.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/DelayShowAdditionalHintsFromWrongAnswerMillis.kt" test_file_not_required: true @@ -2748,6 +3486,22 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/DelayShowInitialHintMillis.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/HelpIndexExtensions.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/HintHandler.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/HintHandlerDebugImpl.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/HintHandlerProdImpl.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/HintsAndSolutionConfigAlphaKenyaModule.kt" test_file_not_required: true @@ -2761,8 +3515,12 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/HintHandler.kt" - test_file_not_required: true + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/HintsAndSolutionDebugModule.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/hintsandsolution/HintsAndSolutionProdModule.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/locale/LocaleApplicationInjector.kt" @@ -2804,6 +3562,18 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/LogStorageModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/LoggingIdentifierController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/LoggingIdentifierModule.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/OppiaLogger.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/AnalyticsStartupListener.kt" test_file_not_required: true @@ -2820,22 +3590,50 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/LearnerAnalyticsInactivityLimitMillis.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/LearnerAnalyticsLogger.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/exceptions/ExceptionsController.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/exceptions/UncaughtExceptionLoggerModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/exceptions/UncaughtExceptionLoggerStartupListener.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/logscheduler/MetricLogSchedulerModule.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/logscheduler/MetricLogSchedulingWorker.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/logscheduler/MetricLogSchedulingWorkerFactory.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorkerFactory.kt" - test_file_not_required: true + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/logscheduler/PerformanceMetricsLogScheduler.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogReportWorkerModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorkerFactory.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/oppialogger/survey/SurveyEventsLogger.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt" test_file_not_required: true @@ -2844,6 +3642,14 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterModule.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterSingletonImpl.kt" test_file_not_required: true @@ -2852,6 +3658,14 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterSingletonModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/syncup/PlatformParameterSyncUpWorkManagerInitializer.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/syncup/PlatformParameterSyncUpWorker.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/syncup/PlatformParameterSyncUpWorkerFactory.kt" test_file_not_required: true @@ -2860,6 +3674,10 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/platformparameter/syncup/PlatformParameterSyncUpWorkerModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/profile/ProfileManagementController.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/question/QuestionAssessmentCalculation.kt" test_file_not_required: true @@ -2868,6 +3686,10 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/question/QuestionAssessmentProgress.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/question/QuestionAssessmentProgressController.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/question/QuestionConstantsProvider.kt" test_file_not_required: true @@ -2884,6 +3706,14 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/question/QuestionTrainingConstantsProvider.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/question/QuestionTrainingController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/spotlight/SpotlightStateController.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/state/StateDeck.kt" test_file_not_required: true @@ -2897,11 +3727,11 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "domain/src/main/java/org/oppia/android/domain/survey/SurveyProgress.kt" + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/survey/SurveyConstantsProvider.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "domain/src/main/java/org/oppia/android/domain/survey/SurveyConstantsProvider.kt" + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/survey/SurveyProgress.kt" test_file_not_required: true } test_file_exemption { @@ -2936,6 +3766,22 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/topic/RevisionCardRetriever.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/topic/StoryProgressController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/topic/TopicController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/topic/TopicListController.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/util/InteractionObjectExtensions.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/util/JsonAssetRetriever.kt" test_file_not_required: true @@ -2944,6 +3790,10 @@ test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/util/JsonExtensions.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "domain/src/main/java/org/oppia/android/domain/util/StateRetriever.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "domain/src/main/java/org/oppia/android/domain/util/WorkDataExtensions.kt" test_file_not_required: true @@ -2956,6 +3806,18 @@ test_file_exemption { exempted_file_path: "domain/src/test/java/org/oppia/android/domain/classify/InteractionObjectTestBuilder.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "instrumentation/src/java/org/oppia/android/instrumentation/application/EndToEndTestGcsResourceModule.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "instrumentation/src/java/org/oppia/android/instrumentation/application/EndToEndTestImageParsingModule.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "instrumentation/src/java/org/oppia/android/instrumentation/application/EndToEndTestNetworkConfigModule.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "instrumentation/src/java/org/oppia/android/instrumentation/application/TestApplicationComponent.kt" test_file_not_required: true @@ -2985,19 +3847,19 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "scripts/src/java/org/oppia/android/scripts/license/MavenArtifactPropertyFetcher.kt" + exempted_file_path: "scripts/src/java/org/oppia/android/scripts/license/LicenseFetcher.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "scripts/src/java/org/oppia/android/scripts/license/MavenArtifactPropertyFetcherImpl.kt" + exempted_file_path: "scripts/src/java/org/oppia/android/scripts/license/LicenseFetcherImpl.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "scripts/src/java/org/oppia/android/scripts/license/LicenseFetcher.kt" + exempted_file_path: "scripts/src/java/org/oppia/android/scripts/license/MavenArtifactPropertyFetcher.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "scripts/src/java/org/oppia/android/scripts/license/LicenseFetcherImpl.kt" + exempted_file_path: "scripts/src/java/org/oppia/android/scripts/license/MavenArtifactPropertyFetcherImpl.kt" test_file_not_required: true } test_file_exemption { @@ -3040,14 +3902,34 @@ test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/DisableAccessibilityChecks.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/FakeAnalyticsEventLogger.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/FakeExceptionLogger.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/FakeFirebaseAuthInstanceWrapperImpl.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/FakeFirestoreEventLogger.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/FakeFirestoreInstanceWrapperImpl.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/FakePerformanceMetricAssessor.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/FakePerformanceMetricsEventLogger.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/OppiaTestAnnotations.kt" test_file_not_required: true @@ -3112,6 +3994,10 @@ test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/junit/OppiaParameterizedTestRunner.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/junit/ParameterValue.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/junit/ParameterizedAndroidJunit4TestRunner.kt" test_file_not_required: true @@ -3141,8 +4027,8 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "testing/src/main/java/org/oppia/android/testing/junit/ParameterValue.kt" - test_file_not_required: true + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/lightweightcheckpointing/ExplorationCheckpointTestHelper.kt" + source_file_is_incompatible_with_code_coverage: true } test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/logging/EventLogSubject.kt" @@ -3157,11 +4043,11 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "testing/src/main/java/org/oppia/android/testing/math/MathExpressionSubject.kt" + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/math/MathEquationSubject.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "testing/src/main/java/org/oppia/android/testing/math/MathEquationSubject.kt" + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/math/MathExpressionSubject.kt" test_file_not_required: true } test_file_exemption { @@ -3232,6 +4118,10 @@ test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/profile/ProfileTestHelper.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/robolectric/IsOnRobolectric.kt" test_file_not_required: true @@ -3240,6 +4130,10 @@ test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/robolectric/RobolectricModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/story/StoryProgressTestHelper.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/threading/BackgroundTestDispatcher.kt" test_file_not_required: true @@ -3248,6 +4142,14 @@ test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/threading/BlockingTestDispatcher.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/threading/TestCoroutineDispatcherEspressoImpl.kt" + source_file_is_incompatible_with_code_coverage: true +} +test_file_exemption { + exempted_file_path: "testing/src/main/java/org/oppia/android/testing/threading/TestCoroutineDispatcherRobolectricImpl.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "testing/src/main/java/org/oppia/android/testing/threading/TestCoroutineDispatchers.kt" test_file_not_required: true @@ -3277,21 +4179,25 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/accessibility/AccessibilityService.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/accessibility/AccessibilityProdModule.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/accessibility/AccessibilityServiceImpl.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/accessibility/AccessibilityService.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/accessibility/AccessibilityProdModule.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/accessibility/AccessibilityServiceImpl.kt" test_file_not_required: true } test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/accessibility/AccessibilityTestModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "utility/src/main/java/org/oppia/android/util/accessibility/FakeAccessibilityService.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/caching/AssetRepository.kt" test_file_not_required: true @@ -3348,6 +4254,10 @@ test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/extensions/ContextExtensions.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "utility/src/main/java/org/oppia/android/util/extensions/StringExtensions.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/gcsresource/GcsResourceAnnotations.kt" test_file_not_required: true @@ -3404,6 +4314,10 @@ test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/LoggingAnnotations.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/MetricLogScheduler.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/SyncStatusManager.kt" test_file_not_required: true @@ -3429,37 +4343,45 @@ test_file_exemption { test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstance.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploader.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapper.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploaderModule.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapperImpl.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLogger.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploader.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLoggerProdImpl.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploaderModule.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstance.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLogger.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapper.kt" test_file_not_required: true } test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLoggerProdImpl.kt" + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapperImpl.kt" test_file_not_required: true } test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/LogReportingModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/performancemetrics/PerformanceMetricsAssessor.kt" + test_file_not_required: true +} +test_file_exemption { + exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/performancemetrics/PerformanceMetricsEventLogger.kt" + test_file_not_required: true +} test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/math/FloatExtensions.kt" test_file_not_required: true @@ -3492,10 +4414,18 @@ test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/parser/html/ExplorationHtmlParserEntityType.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "utility/src/main/java/org/oppia/android/util/parser/html/HtmlParser.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/parser/html/HtmlParserEntityTypeModule.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "utility/src/main/java/org/oppia/android/util/parser/html/ListItemLeadingMarginSpan.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/parser/html/PolicyType.kt" test_file_not_required: true @@ -3596,6 +4526,10 @@ test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/platformparameter/PlatformParameterConstants.kt" test_file_not_required: true } +test_file_exemption { + exempted_file_path: "utility/src/main/java/org/oppia/android/util/platformparameter/PlatformParameterSingleton.kt" + source_file_is_incompatible_with_code_coverage: true +} test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/platformparameter/PlatformParameterValue.kt" test_file_not_required: true @@ -3648,18 +4582,6 @@ test_file_exemption { exempted_file_path: "utility/src/main/java/org/oppia/android/util/threading/DispatcherModule.kt" test_file_not_required: true } -test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/performancemetrics/PerformanceMetricsAssessor.kt" - test_file_not_required: true -} -test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/MetricLogScheduler.kt" - test_file_not_required: true -} -test_file_exemption { - exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/performancemetrics/PerformanceMetricsEventLogger.kt" - test_file_not_required: true -} test_file_exemption { exempted_file_path: "utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerTestBase.kt" test_file_not_required: true diff --git a/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt b/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt index 6a302d0eb9f..04a3ce96d5a 100644 --- a/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt +++ b/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt @@ -133,15 +133,16 @@ class BazelClient(private val rootDirectory: File, private val commandExecutor: /** * Runs code coverage for the specified Bazel test target. * - * Null return typically occurs when the coverage command fails to generate the 'coverage.dat' file - * This can happen due to: Test failures or misconfigurations that prevent the coverage data - * from being generated properly. + * An empty list being returned typically occurs when the coverage command fails to generate any + * 'coverage.dat' file. This can happen due to tests failures or a misconfiguration that prevents + * the coverage data from being properly generated. * * @param bazelTestTarget Bazel test target for which code coverage will be run - * @return the generated coverage data as a list of strings - * or null if the coverage data file could not be parsed + * @return the generated coverage data as a list of list of strings (since there may be more than + * one file corresponding to a single test target, e.g. in the case of a sharded test), or an + * empty list if no coverage data was found while running the test */ - fun runCoverageForTestTarget(bazelTestTarget: String): List? { + fun runCoverageForTestTarget(bazelTestTarget: String): List> { val instrumentation = bazelTestTarget.split(":")[0] val computeInstrumentation = instrumentation.split("/").let { "//${it[2]}/..." } val coverageCommandOutputLines = executeBazelCommand( @@ -149,22 +150,21 @@ class BazelClient(private val rootDirectory: File, private val commandExecutor: bazelTestTarget, "--instrumentation_filter=$computeInstrumentation" ) - return parseCoverageDataFilePath(coverageCommandOutputLines)?.let { path -> + return parseCoverageDataFilePath(bazelTestTarget, coverageCommandOutputLines).map { path -> File(path).readLines() } } - private fun parseCoverageDataFilePath(coverageCommandOutputLines: List): String? { - val regex = ".*coverage\\.dat$".toRegex() - for (line in coverageCommandOutputLines) { - val match = regex.find(line) - val extractedPath = match?.value?.substringAfterLast(",")?.trim() - if (extractedPath != null) { - println("Raw Coverage Data: $extractedPath") - return extractedPath - } - } - return null + private fun parseCoverageDataFilePath( + bazelTestTarget: String, + coverageCommandOutputLines: List + ): List { + // TODO: RD to upstream this & update tests accordingly. + // Use the test target as the base path for the generated coverage.dat file since the test + // itself may output lines that look like the coverage.dat line (such as in BazelClientTest). + val targetBasePath = bazelTestTarget.removePrefix("//").replace(':', '/') + val coverageDatRegex = "^.+?testlogs/$targetBasePath/[^/]*?/?coverage\\.dat$".toRegex() + return coverageCommandOutputLines.filter(coverageDatRegex::matches).map(String::trim) } /** diff --git a/scripts/src/java/org/oppia/android/scripts/coverage/CoverageRunner.kt b/scripts/src/java/org/oppia/android/scripts/coverage/CoverageRunner.kt index 7a61e0fa07b..f0ffcb8ff53 100644 --- a/scripts/src/java/org/oppia/android/scripts/coverage/CoverageRunner.kt +++ b/scripts/src/java/org/oppia/android/scripts/coverage/CoverageRunner.kt @@ -34,20 +34,17 @@ class CoverageRunner( */ fun retrieveCoverageDataForTestTarget( bazelTestTarget: String - ): CoverageReport { - val coverageResult = retrieveCoverageResult(bazelTestTarget) - ?: error("Failed to retrieve coverage result for $bazelTestTarget") - - return coverageDataFileLines(coverageResult, bazelTestTarget) - } - - private fun retrieveCoverageResult( - bazelTestTarget: String - ): List? { - return bazelClient.runCoverageForTestTarget(bazelTestTarget) + ): List { + val coverageResults = bazelClient.runCoverageForTestTarget(bazelTestTarget) + check(coverageResults.isNotEmpty()) { + "Failed to retrieve coverage results for $bazelTestTarget." + } + return coverageResults.map { singleCoverageDatFileLines -> + parseCoverageDataFileLines(singleCoverageDatFileLines, bazelTestTarget) + } } - private fun coverageDataFileLines( + private fun parseCoverageDataFileLines( coverageData: List, bazelTestTarget: String ): CoverageReport { diff --git a/scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt b/scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt index ec44977a53c..729b2d13118 100644 --- a/scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt +++ b/scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt @@ -106,7 +106,7 @@ class RunCoverage( fun execute() { val testFileExemptionList = loadTestFileExemptionsProto(testFileExemptionTextProto) .testFileExemptionList - .filter { it.testFileNotRequired } + .filter { it.testFileNotRequired || it.sourceFileIsIncompatibleWithCodeCoverage } .map { it.exemptedFilePath } if (filePath in testFileExemptionList) { @@ -114,12 +114,17 @@ class RunCoverage( } else { val testFilePaths = findTestFiles(repoRoot, filePath) check(testFilePaths.isNotEmpty()) { - "No appropriate test file found for $filePath" + "No appropriate test file found for $filePath." } val testTargets = bazelClient.retrieveBazelTargets(testFilePaths) - val coverageReports = testTargets.map { testTarget -> + // TODO: RD to add this check in an upstream PR & add a test for it. + check(testTargets.isNotEmpty()) { + "Missing test declaration(s) for existing test file(s): $testFilePaths." + } + + val coverageReports = testTargets.flatMap { testTarget -> CoverageRunner(rootDirectory, scriptBgDispatcher, commandExecutor) .retrieveCoverageDataForTestTarget(testTarget.removeSuffix(".kt")) } diff --git a/scripts/src/java/org/oppia/android/scripts/proto/script_exemptions.proto b/scripts/src/java/org/oppia/android/scripts/proto/script_exemptions.proto index ce735c07b66..be0af6c0d20 100644 --- a/scripts/src/java/org/oppia/android/scripts/proto/script_exemptions.proto +++ b/scripts/src/java/org/oppia/android/scripts/proto/script_exemptions.proto @@ -49,6 +49,11 @@ message TestFileExemptions { // Overrides the minimum coverage percent required for the given file. int32 override_min_coverage_percent_required = 3; + + // A medium-term state to indicate that something about this source file's build config, or + // that of its test(s), are not compatible with the current code coverage tooling and thus + // should be ignored. + bool source_file_is_incompatible_with_code_coverage = 4; } } } diff --git a/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt b/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt index 296f44cac2c..f0d6a39a703 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt @@ -387,9 +387,9 @@ class BazelClientTest { val sourceContent = """ package com.example - + class AddNums { - + companion object { fun sumNumbers(a: Int, b: Int): Any { return if (a == 0 && b == 0) { @@ -405,16 +405,16 @@ class BazelClientTest { val testContent = """ package com.example - + import org.junit.Assert.assertEquals import org.junit.Test - + class AddNumsTest { - + @Test fun testSumNumbers() { assertEquals(AddNums.sumNumbers(0, 1), 1) - assertEquals(AddNums.sumNumbers(3, 4), 7) + assertEquals(AddNums.sumNumbers(3, 4), 7) assertEquals(AddNums.sumNumbers(0, 0), "Both numbers are zero") } } @@ -433,26 +433,28 @@ class BazelClientTest { "//coverage/test/java/com/example:AddNumsTest" ) val expectedResult = listOf( - "SF:coverage/main/java/com/example/AddNums.kt", - "FN:7,com/example/AddNums${'$'}Companion::sumNumbers (II)Ljava/lang/Object;", - "FN:3,com/example/AddNums:: ()V", - "FNDA:1,com/example/AddNums${'$'}Companion::sumNumbers (II)Ljava/lang/Object;", - "FNDA:0,com/example/AddNums:: ()V", - "FNF:2", - "FNH:1", - "BRDA:7,0,0,1", - "BRDA:7,0,1,1", - "BRDA:7,0,2,1", - "BRDA:7,0,3,1", - "BRF:4", - "BRH:4", - "DA:3,0", - "DA:7,1", - "DA:8,1", - "DA:10,1", - "LH:3", - "LF:4", - "end_of_record" + listOf( + "SF:coverage/main/java/com/example/AddNums.kt", + "FN:7,com/example/AddNums${'$'}Companion::sumNumbers (II)Ljava/lang/Object;", + "FN:3,com/example/AddNums:: ()V", + "FNDA:1,com/example/AddNums${'$'}Companion::sumNumbers (II)Ljava/lang/Object;", + "FNDA:0,com/example/AddNums:: ()V", + "FNF:2", + "FNH:1", + "BRDA:7,0,0,1", + "BRDA:7,0,1,1", + "BRDA:7,0,2,1", + "BRDA:7,0,3,1", + "BRF:4", + "BRH:4", + "DA:3,0", + "DA:7,1", + "DA:8,1", + "DA:10,1", + "LH:3", + "LF:4", + "end_of_record" + ) ) assertThat(result).isEqualTo(expectedResult) diff --git a/scripts/src/javatests/org/oppia/android/scripts/coverage/CoverageRunnerTest.kt b/scripts/src/javatests/org/oppia/android/scripts/coverage/CoverageRunnerTest.kt index 2ffebe2f984..4e83604d74b 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/coverage/CoverageRunnerTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/coverage/CoverageRunnerTest.kt @@ -40,9 +40,9 @@ class CoverageRunnerTest { sourceContent = """ package com.example - + class AddNums { - + companion object { fun sumNumbers(a: Int, b: Int): Any { return if (a == 0 && b == 0) { @@ -58,16 +58,16 @@ class CoverageRunnerTest { testContent = """ package com.example - + import org.junit.Assert.assertEquals import org.junit.Test - + class AddNumsTest { - + @Test fun testSumNumbers() { assertEquals(AddNums.sumNumbers(0, 1), 1) - assertEquals(AddNums.sumNumbers(3, 4), 7) + assertEquals(AddNums.sumNumbers(3, 4), 7) assertEquals(AddNums.sumNumbers(0, 0), "Both numbers are zero") } } @@ -137,17 +137,17 @@ class CoverageRunnerTest { subTestFile.writeText( """ package com.example - + import org.junit.Assert.assertEquals import org.junit.Test import com.example.AddNums - + class SubNumsTest { - + @Test fun testSubNumbers() { assertEquals(AddNums.sumNumbers(0, 1), 1) - assertEquals(AddNums.sumNumbers(3, 4), 7) + assertEquals(AddNums.sumNumbers(3, 4), 7) assertEquals(AddNums.sumNumbers(0, 0), "Both numbers are zero") } } @@ -191,7 +191,7 @@ class CoverageRunnerTest { testSubpackage = "coverage/test/java/com/example" ) - val result = coverageRunner.retrieveCoverageDataForTestTarget( + val results = coverageRunner.retrieveCoverageDataForTestTarget( "//coverage/test/java/com/example:AddNumsTest" ) @@ -230,7 +230,8 @@ class CoverageRunnerTest { .setLinesHit(3) .build() - assertThat(result).isEqualTo(expectedResult) + assertThat(results).hasSize(1) + assertThat(results[0]).isEqualTo(expectedResult) } private fun initializeCommandExecutorWithLongProcessWaitTime(): CommandExecutorImpl { diff --git a/testing/src/test/java/org/oppia/android/testing/robolectric/BUILD.bazel b/testing/src/test/java/org/oppia/android/testing/robolectric/BUILD.bazel index a569473150f..b40626ec252 100644 --- a/testing/src/test/java/org/oppia/android/testing/robolectric/BUILD.bazel +++ b/testing/src/test/java/org/oppia/android/testing/robolectric/BUILD.bazel @@ -4,6 +4,42 @@ Tests for Robolectric-specific utilities and configurations. load("//:oppia_android_test.bzl", "oppia_android_test") +oppia_android_test( + name = "OppiaShadowActivityManagerTest", + srcs = ["OppiaShadowActivityManagerTest.kt"], + custom_package = "org.oppia.android.testing.robolectric", + test_class = "org.oppia.android.testing.robolectric.OppiaShadowActivityManagerTest", + test_manifest = "//testing:test_manifest", + deps = [ + "//:dagger", + "//testing/src/main/java/org/oppia/android/testing/robolectric:oppia_shadow_activity_manager", + "//third_party:androidx_core_core", + "//third_party:androidx_test_ext_junit", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + ], +) + +oppia_android_test( + name = "OppiaShadowTrafficStatsTest", + srcs = ["OppiaShadowTrafficStatsTest.kt"], + custom_package = "org.oppia.android.testing.robolectric", + test_class = "org.oppia.android.testing.robolectric.OppiaShadowTrafficStatsTest", + test_manifest = "//testing:test_manifest", + deps = [ + "//:dagger", + "//testing/src/main/java/org/oppia/android/testing/robolectric:oppia_shadow_traffic_stats", + "//third_party:androidx_core_core", + "//third_party:androidx_test_ext_junit", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + ], +) + oppia_android_test( name = "ShadowBidiFormatterTest", srcs = ["ShadowBidiFormatterTest.kt"], diff --git a/utility/src/test/java/org/oppia/android/util/logging/BUILD.bazel b/utility/src/test/java/org/oppia/android/util/logging/BUILD.bazel index fca189182df..32e765b11d4 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/BUILD.bazel +++ b/utility/src/test/java/org/oppia/android/util/logging/BUILD.bazel @@ -22,6 +22,23 @@ kt_android_library( ], ) +oppia_android_test( + name = "CurrentAppScreenNameIntentDecoratorTest", + srcs = ["CurrentAppScreenNameIntentDecoratorTest.kt"], + custom_package = "org.oppia.android.util.logging", + test_class = "org.oppia.android.util.logging.CurrentAppScreenNameIntentDecoratorTest", + test_manifest = "//utility:test_manifest", + deps = [ + "//:dagger", + "//third_party:androidx_test_ext_junit", + "//third_party:androidx_test_ext_truth", + "//third_party:com_google_truth_truth", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + "//utility/src/main/java/org/oppia/android/util/logging:current_app_screen_name_intent_decorator", + ], +) + oppia_android_test( name = "EventBundleCreatorTest", srcs = ["EventBundleCreatorTest.kt"], diff --git a/utility/src/test/java/org/oppia/android/util/profile/BUILD.bazel b/utility/src/test/java/org/oppia/android/util/profile/BUILD.bazel index 4ee39e3515c..480f7a244ec 100644 --- a/utility/src/test/java/org/oppia/android/util/profile/BUILD.bazel +++ b/utility/src/test/java/org/oppia/android/util/profile/BUILD.bazel @@ -4,6 +4,43 @@ Tests for profile utilities. load("//:oppia_android_test.bzl", "oppia_android_test") +oppia_android_test( + name = "CurrentUserProfileIdIntentDecoratorTest", + srcs = ["CurrentUserProfileIdIntentDecoratorTest.kt"], + custom_package = "org.oppia.android.util.profile", + test_class = "org.oppia.android.util.profile.CurrentUserProfileIdIntentDecoratorTest", + test_manifest = "//utility:test_manifest", + deps = [ + "//third_party:androidx_test_ext_junit", + "//third_party:com_google_truth_extensions_truth-liteproto-extension", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + "//utility/src/main/java/org/oppia/android/util/profile:current_user_profile_id_intent_decorator", + ], +) + +oppia_android_test( + name = "DirectoryManagementUtilTest", + srcs = ["DirectoryManagementUtilTest.kt"], + custom_package = "org.oppia.android.util.profile", + test_class = "org.oppia.android.util.profile.DirectoryManagementUtilTest", + test_manifest = "//utility:test_manifest", + deps = [ + "//:dagger", + "//testing/src/main/java/org/oppia/android/testing/robolectric:test_module", + "//testing/src/main/java/org/oppia/android/testing/time:test_module", + "//third_party:androidx_test_ext_junit", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + "//utility/src/main/java/org/oppia/android/util/logging:prod_module", + "//utility/src/main/java/org/oppia/android/util/profile:directory_management_util", + ], +) + oppia_android_test( name = "ProfileNameValidatorTest", srcs = ["ProfileNameValidatorTest.kt"], diff --git a/utility/src/test/java/org/oppia/android/util/profile/DirectoryManagementUtilTest.kt b/utility/src/test/java/org/oppia/android/util/profile/DirectoryManagementUtilTest.kt index 84f774e11e8..6623ec67c1b 100644 --- a/utility/src/test/java/org/oppia/android/util/profile/DirectoryManagementUtilTest.kt +++ b/utility/src/test/java/org/oppia/android/util/profile/DirectoryManagementUtilTest.kt @@ -128,7 +128,7 @@ class DirectoryManagementUtilTest { assertThat(success).isTrue() assertThat(dir.exists()).isTrue() - assertThat(dir.listFiles().isEmpty()).isTrue() + assertThat(dir.listFiles()?.isEmpty()).isTrue() } private fun getAbsoluteDirPath(path: String): String { From e4d0aa82a4e7ee6a9510aa4c288704b650abf367 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Thu, 8 Aug 2024 22:18:37 -0700 Subject: [PATCH 2/3] Address self-review comments. This removes code that was moved to a downstream PR, adds missing test coverage for the new exemption behavior, and improves the messaging for the new exemption behavior. Also, updates the shard count for RunCoverageTest since 4 seemed to be a bit too few when running the test locally since the tests can take quite some time to complete. --- .../android/scripts/common/BazelClient.kt | 36 ++++---- .../scripts/coverage/CoverageRunner.kt | 21 +++-- .../android/scripts/coverage/RunCoverage.kt | 36 ++++---- .../scripts/proto/script_exemptions.proto | 2 + .../android/scripts/common/BazelClientTest.kt | 54 ++++++----- .../android/scripts/coverage/BUILD.bazel | 2 +- .../scripts/coverage/CoverageRunnerTest.kt | 25 +++-- .../scripts/coverage/RunCoverageTest.kt | 91 +++++++++++++++---- 8 files changed, 163 insertions(+), 104 deletions(-) diff --git a/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt b/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt index 04a3ce96d5a..6a302d0eb9f 100644 --- a/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt +++ b/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt @@ -133,16 +133,15 @@ class BazelClient(private val rootDirectory: File, private val commandExecutor: /** * Runs code coverage for the specified Bazel test target. * - * An empty list being returned typically occurs when the coverage command fails to generate any - * 'coverage.dat' file. This can happen due to tests failures or a misconfiguration that prevents - * the coverage data from being properly generated. + * Null return typically occurs when the coverage command fails to generate the 'coverage.dat' file + * This can happen due to: Test failures or misconfigurations that prevent the coverage data + * from being generated properly. * * @param bazelTestTarget Bazel test target for which code coverage will be run - * @return the generated coverage data as a list of list of strings (since there may be more than - * one file corresponding to a single test target, e.g. in the case of a sharded test), or an - * empty list if no coverage data was found while running the test + * @return the generated coverage data as a list of strings + * or null if the coverage data file could not be parsed */ - fun runCoverageForTestTarget(bazelTestTarget: String): List> { + fun runCoverageForTestTarget(bazelTestTarget: String): List? { val instrumentation = bazelTestTarget.split(":")[0] val computeInstrumentation = instrumentation.split("/").let { "//${it[2]}/..." } val coverageCommandOutputLines = executeBazelCommand( @@ -150,21 +149,22 @@ class BazelClient(private val rootDirectory: File, private val commandExecutor: bazelTestTarget, "--instrumentation_filter=$computeInstrumentation" ) - return parseCoverageDataFilePath(bazelTestTarget, coverageCommandOutputLines).map { path -> + return parseCoverageDataFilePath(coverageCommandOutputLines)?.let { path -> File(path).readLines() } } - private fun parseCoverageDataFilePath( - bazelTestTarget: String, - coverageCommandOutputLines: List - ): List { - // TODO: RD to upstream this & update tests accordingly. - // Use the test target as the base path for the generated coverage.dat file since the test - // itself may output lines that look like the coverage.dat line (such as in BazelClientTest). - val targetBasePath = bazelTestTarget.removePrefix("//").replace(':', '/') - val coverageDatRegex = "^.+?testlogs/$targetBasePath/[^/]*?/?coverage\\.dat$".toRegex() - return coverageCommandOutputLines.filter(coverageDatRegex::matches).map(String::trim) + private fun parseCoverageDataFilePath(coverageCommandOutputLines: List): String? { + val regex = ".*coverage\\.dat$".toRegex() + for (line in coverageCommandOutputLines) { + val match = regex.find(line) + val extractedPath = match?.value?.substringAfterLast(",")?.trim() + if (extractedPath != null) { + println("Raw Coverage Data: $extractedPath") + return extractedPath + } + } + return null } /** diff --git a/scripts/src/java/org/oppia/android/scripts/coverage/CoverageRunner.kt b/scripts/src/java/org/oppia/android/scripts/coverage/CoverageRunner.kt index f0ffcb8ff53..7a61e0fa07b 100644 --- a/scripts/src/java/org/oppia/android/scripts/coverage/CoverageRunner.kt +++ b/scripts/src/java/org/oppia/android/scripts/coverage/CoverageRunner.kt @@ -34,17 +34,20 @@ class CoverageRunner( */ fun retrieveCoverageDataForTestTarget( bazelTestTarget: String - ): List { - val coverageResults = bazelClient.runCoverageForTestTarget(bazelTestTarget) - check(coverageResults.isNotEmpty()) { - "Failed to retrieve coverage results for $bazelTestTarget." - } - return coverageResults.map { singleCoverageDatFileLines -> - parseCoverageDataFileLines(singleCoverageDatFileLines, bazelTestTarget) - } + ): CoverageReport { + val coverageResult = retrieveCoverageResult(bazelTestTarget) + ?: error("Failed to retrieve coverage result for $bazelTestTarget") + + return coverageDataFileLines(coverageResult, bazelTestTarget) + } + + private fun retrieveCoverageResult( + bazelTestTarget: String + ): List? { + return bazelClient.runCoverageForTestTarget(bazelTestTarget) } - private fun parseCoverageDataFileLines( + private fun coverageDataFileLines( coverageData: List, bazelTestTarget: String ): CoverageReport { diff --git a/scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt b/scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt index 729b2d13118..061b515df8d 100644 --- a/scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt +++ b/scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt @@ -85,12 +85,12 @@ class RunCoverage( private val reportFormat: ReportFormat, private val reportOutputPath: String, private val commandExecutor: CommandExecutor, - private val scriptBgDispatcher: ScriptBackgroundCoroutineDispatcher + private val scriptBgDispatcher: ScriptBackgroundCoroutineDispatcher, + private val testFileExemptionTextProtoPath: String = "scripts/assets/test_file_exemptions.pb" ) { private val bazelClient by lazy { BazelClient(File(repoRoot), commandExecutor) } private val rootDirectory = File(repoRoot).absoluteFile - private val testFileExemptionTextProto = "scripts/assets/test_file_exemptions" /** * Executes coverage analysis for the specified file. @@ -104,13 +104,20 @@ class RunCoverage( * the file is exempted from having a test file, an empty list is returned */ fun execute() { - val testFileExemptionList = loadTestFileExemptionsProto(testFileExemptionTextProto) - .testFileExemptionList - .filter { it.testFileNotRequired || it.sourceFileIsIncompatibleWithCodeCoverage } - .map { it.exemptedFilePath } - - if (filePath in testFileExemptionList) { - println("This file is exempted from having a test file; skipping coverage check.") + val testFileExemptions = loadTestFileExemptionsProto(testFileExemptionTextProtoPath) + val filesNotNeedingTests = + testFileExemptions + .testFileExemptionList.filter { it.testFileNotRequired }.map { it.exemptedFilePath } + val filesIncompatibleWithCodeCoverage = + testFileExemptions + .testFileExemptionList + .filter { it.sourceFileIsIncompatibleWithCodeCoverage } + .map { it.exemptedFilePath } + + if (filePath in filesNotNeedingTests || filePath in filesIncompatibleWithCodeCoverage) { + if (filePath in filesIncompatibleWithCodeCoverage) { + println("This file is incompatible with code coverage tooling; skipping coverage check.") + } else println("This file is exempted from having a test file; skipping coverage check.") } else { val testFilePaths = findTestFiles(repoRoot, filePath) check(testFilePaths.isNotEmpty()) { @@ -119,12 +126,7 @@ class RunCoverage( val testTargets = bazelClient.retrieveBazelTargets(testFilePaths) - // TODO: RD to add this check in an upstream PR & add a test for it. - check(testTargets.isNotEmpty()) { - "Missing test declaration(s) for existing test file(s): $testFilePaths." - } - - val coverageReports = testTargets.flatMap { testTarget -> + val coverageReports = testTargets.map { testTarget -> CoverageRunner(rootDirectory, scriptBgDispatcher, commandExecutor) .retrieveCoverageDataForTestTarget(testTarget.removeSuffix(".kt")) } @@ -223,8 +225,8 @@ private fun getReportOutputPath( return "$repoRoot/coverage_reports/$fileWithoutExtension/$defaultFilename" } -private fun loadTestFileExemptionsProto(testFileExemptiontextProto: String): TestFileExemptions { - return File("$testFileExemptiontextProto.pb").inputStream().use { stream -> +private fun loadTestFileExemptionsProto(testFileExemptionProtoPath: String): TestFileExemptions { + return File(testFileExemptionProtoPath).inputStream().use { stream -> TestFileExemptions.newBuilder().also { builder -> builder.mergeFrom(stream) }.build() diff --git a/scripts/src/java/org/oppia/android/scripts/proto/script_exemptions.proto b/scripts/src/java/org/oppia/android/scripts/proto/script_exemptions.proto index be0af6c0d20..533fa7429f3 100644 --- a/scripts/src/java/org/oppia/android/scripts/proto/script_exemptions.proto +++ b/scripts/src/java/org/oppia/android/scripts/proto/script_exemptions.proto @@ -50,6 +50,8 @@ message TestFileExemptions { // Overrides the minimum coverage percent required for the given file. int32 override_min_coverage_percent_required = 3; + // TODO(#5481): Remove this property & all corresponding exemptions once all test + // configurations are compatible with code coverage tooling. // A medium-term state to indicate that something about this source file's build config, or // that of its test(s), are not compatible with the current code coverage tooling and thus // should be ignored. diff --git a/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt b/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt index f0d6a39a703..296f44cac2c 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt @@ -387,9 +387,9 @@ class BazelClientTest { val sourceContent = """ package com.example - + class AddNums { - + companion object { fun sumNumbers(a: Int, b: Int): Any { return if (a == 0 && b == 0) { @@ -405,16 +405,16 @@ class BazelClientTest { val testContent = """ package com.example - + import org.junit.Assert.assertEquals import org.junit.Test - + class AddNumsTest { - + @Test fun testSumNumbers() { assertEquals(AddNums.sumNumbers(0, 1), 1) - assertEquals(AddNums.sumNumbers(3, 4), 7) + assertEquals(AddNums.sumNumbers(3, 4), 7) assertEquals(AddNums.sumNumbers(0, 0), "Both numbers are zero") } } @@ -433,28 +433,26 @@ class BazelClientTest { "//coverage/test/java/com/example:AddNumsTest" ) val expectedResult = listOf( - listOf( - "SF:coverage/main/java/com/example/AddNums.kt", - "FN:7,com/example/AddNums${'$'}Companion::sumNumbers (II)Ljava/lang/Object;", - "FN:3,com/example/AddNums:: ()V", - "FNDA:1,com/example/AddNums${'$'}Companion::sumNumbers (II)Ljava/lang/Object;", - "FNDA:0,com/example/AddNums:: ()V", - "FNF:2", - "FNH:1", - "BRDA:7,0,0,1", - "BRDA:7,0,1,1", - "BRDA:7,0,2,1", - "BRDA:7,0,3,1", - "BRF:4", - "BRH:4", - "DA:3,0", - "DA:7,1", - "DA:8,1", - "DA:10,1", - "LH:3", - "LF:4", - "end_of_record" - ) + "SF:coverage/main/java/com/example/AddNums.kt", + "FN:7,com/example/AddNums${'$'}Companion::sumNumbers (II)Ljava/lang/Object;", + "FN:3,com/example/AddNums:: ()V", + "FNDA:1,com/example/AddNums${'$'}Companion::sumNumbers (II)Ljava/lang/Object;", + "FNDA:0,com/example/AddNums:: ()V", + "FNF:2", + "FNH:1", + "BRDA:7,0,0,1", + "BRDA:7,0,1,1", + "BRDA:7,0,2,1", + "BRDA:7,0,3,1", + "BRF:4", + "BRH:4", + "DA:3,0", + "DA:7,1", + "DA:8,1", + "DA:10,1", + "LH:3", + "LF:4", + "end_of_record" ) assertThat(result).isEqualTo(expectedResult) diff --git a/scripts/src/javatests/org/oppia/android/scripts/coverage/BUILD.bazel b/scripts/src/javatests/org/oppia/android/scripts/coverage/BUILD.bazel index b58902a767a..30d077ba9f1 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/coverage/BUILD.bazel +++ b/scripts/src/javatests/org/oppia/android/scripts/coverage/BUILD.bazel @@ -8,7 +8,7 @@ kt_jvm_test( name = "RunCoverageTest", size = "large", srcs = ["RunCoverageTest.kt"], - shard_count = 4, + shard_count = 8, deps = [ "//scripts:test_file_check_assets", "//scripts/src/java/org/oppia/android/scripts/coverage:run_coverage_lib", diff --git a/scripts/src/javatests/org/oppia/android/scripts/coverage/CoverageRunnerTest.kt b/scripts/src/javatests/org/oppia/android/scripts/coverage/CoverageRunnerTest.kt index 4e83604d74b..2ffebe2f984 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/coverage/CoverageRunnerTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/coverage/CoverageRunnerTest.kt @@ -40,9 +40,9 @@ class CoverageRunnerTest { sourceContent = """ package com.example - + class AddNums { - + companion object { fun sumNumbers(a: Int, b: Int): Any { return if (a == 0 && b == 0) { @@ -58,16 +58,16 @@ class CoverageRunnerTest { testContent = """ package com.example - + import org.junit.Assert.assertEquals import org.junit.Test - + class AddNumsTest { - + @Test fun testSumNumbers() { assertEquals(AddNums.sumNumbers(0, 1), 1) - assertEquals(AddNums.sumNumbers(3, 4), 7) + assertEquals(AddNums.sumNumbers(3, 4), 7) assertEquals(AddNums.sumNumbers(0, 0), "Both numbers are zero") } } @@ -137,17 +137,17 @@ class CoverageRunnerTest { subTestFile.writeText( """ package com.example - + import org.junit.Assert.assertEquals import org.junit.Test import com.example.AddNums - + class SubNumsTest { - + @Test fun testSubNumbers() { assertEquals(AddNums.sumNumbers(0, 1), 1) - assertEquals(AddNums.sumNumbers(3, 4), 7) + assertEquals(AddNums.sumNumbers(3, 4), 7) assertEquals(AddNums.sumNumbers(0, 0), "Both numbers are zero") } } @@ -191,7 +191,7 @@ class CoverageRunnerTest { testSubpackage = "coverage/test/java/com/example" ) - val results = coverageRunner.retrieveCoverageDataForTestTarget( + val result = coverageRunner.retrieveCoverageDataForTestTarget( "//coverage/test/java/com/example:AddNumsTest" ) @@ -230,8 +230,7 @@ class CoverageRunnerTest { .setLinesHit(3) .build() - assertThat(results).hasSize(1) - assertThat(results[0]).isEqualTo(expectedResult) + assertThat(result).isEqualTo(expectedResult) } private fun initializeCommandExecutorWithLongProcessWaitTime(): CommandExecutorImpl { diff --git a/scripts/src/javatests/org/oppia/android/scripts/coverage/RunCoverageTest.kt b/scripts/src/javatests/org/oppia/android/scripts/coverage/RunCoverageTest.kt index 1fbd57dc0c9..3a0153ecf2f 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/coverage/RunCoverageTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/coverage/RunCoverageTest.kt @@ -8,6 +8,7 @@ import org.junit.Test import org.junit.rules.TemporaryFolder import org.oppia.android.scripts.common.CommandExecutorImpl import org.oppia.android.scripts.common.ScriptBackgroundCoroutineDispatcher +import org.oppia.android.scripts.proto.TestFileExemptions import org.oppia.android.scripts.testing.TestBazelWorkspace import org.oppia.android.testing.assertThrows import java.io.ByteArrayOutputStream @@ -197,7 +198,14 @@ class RunCoverageTest { @Test fun testRunCoverage_testFileExempted_noCoverage() { System.setOut(PrintStream(outContent)) - val exemptedFilePath = "app/src/main/java/org/oppia/android/app/activity/ActivityComponent.kt" + val exemptedFilePath = "SourceExemptedFromHavingTestFile.kt" + val testFileExemption = TestFileExemptions.TestFileExemption.newBuilder().apply { + this.exemptedFilePath = exemptedFilePath + this.testFileNotRequired = true + }.build() + val testFileExemptions = TestFileExemptions.newBuilder().apply { + addTestFileExemption(testFileExemption) + }.build() RunCoverage( "${tempFolder.root}", @@ -205,12 +213,38 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile(testFileExemptions) ).execute() - assertThat(outContent.toString().trim()).isEqualTo( - "This file is exempted from having a test file; skipping coverage check." - ) + assertThat(outContent.toString().trim()) + .isEqualTo("This file is exempted from having a test file; skipping coverage check.") + } + + @Test + fun testRunCoverage_sourceFileIncompatibleWithCodeCoverage_exemptedFromCoverageAnalysis() { + System.setOut(PrintStream(outContent)) + val incompatibleFilePath = "SourceIncompatibleWithCoverage.kt" + val testFileExemption = TestFileExemptions.TestFileExemption.newBuilder().apply { + this.exemptedFilePath = incompatibleFilePath + this.sourceFileIsIncompatibleWithCodeCoverage = true + }.build() + val testFileExemptions = TestFileExemptions.newBuilder().apply { + addTestFileExemption(testFileExemption) + }.build() + + RunCoverage( + "${tempFolder.root}", + incompatibleFilePath, + ReportFormat.MARKDOWN, + markdownOutputPath, + longCommandExecutor, + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile(testFileExemptions) + ).execute() + + assertThat(outContent.toString().trim()) + .isEqualTo("This file is incompatible with code coverage tooling; skipping coverage check.") } @Test @@ -262,7 +296,8 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -291,7 +326,8 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -320,7 +356,8 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -367,7 +404,8 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -396,7 +434,8 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -458,7 +497,8 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -529,7 +569,8 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -565,7 +606,8 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -594,7 +636,8 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -623,7 +666,8 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -670,7 +714,8 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -699,7 +744,8 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -761,7 +807,8 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher + scriptBgDispatcher, + testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -1127,6 +1174,14 @@ class RunCoverageTest { return htmlText } + private fun createTestFileExemptionsProtoFile( + testFileExemptions: TestFileExemptions = TestFileExemptions.getDefaultInstance() + ): String { + return tempFolder.newFile("test_file_exemptions.pb").also { + it.outputStream().use(testFileExemptions::writeTo) + }.path + } + private fun initializeCommandExecutorWithLongProcessWaitTime(): CommandExecutorImpl { return CommandExecutorImpl( scriptBgDispatcher, processTimeout = 5, processTimeoutUnit = TimeUnit.MINUTES From 3f8ea11b602493eb05dd60b602b953d67d56f0ff Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Fri, 9 Aug 2024 17:04:36 -0700 Subject: [PATCH 3/3] Address review comment. --- .../scripts/coverage/RunCoverageTest.kt | 43 ++++++------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/scripts/src/javatests/org/oppia/android/scripts/coverage/RunCoverageTest.kt b/scripts/src/javatests/org/oppia/android/scripts/coverage/RunCoverageTest.kt index 3a0153ecf2f..9eeae3653db 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/coverage/RunCoverageTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/coverage/RunCoverageTest.kt @@ -296,8 +296,7 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -326,8 +325,7 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -356,8 +354,7 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -404,8 +401,7 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -434,8 +430,7 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -497,8 +492,7 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -569,8 +563,7 @@ class RunCoverageTest { ReportFormat.MARKDOWN, markdownOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(markdownOutputPath).readText() @@ -606,8 +599,7 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -636,8 +628,7 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -666,8 +657,7 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -714,8 +704,7 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -744,8 +733,7 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -807,8 +795,7 @@ class RunCoverageTest { ReportFormat.HTML, htmlOutputPath, longCommandExecutor, - scriptBgDispatcher, - testFileExemptionTextProtoPath = createTestFileExemptionsProtoFile() + scriptBgDispatcher ).execute() val outputReportText = File(htmlOutputPath).readText() @@ -1174,9 +1161,7 @@ class RunCoverageTest { return htmlText } - private fun createTestFileExemptionsProtoFile( - testFileExemptions: TestFileExemptions = TestFileExemptions.getDefaultInstance() - ): String { + private fun createTestFileExemptionsProtoFile(testFileExemptions: TestFileExemptions): String { return tempFolder.newFile("test_file_exemptions.pb").also { it.outputStream().use(testFileExemptions::writeTo) }.path