Skip to content

kaspresso integration tests#119

Merged
ScharfViktor merged 4 commits intomainfrom
kasspresso-integration-tests
Apr 23, 2026
Merged

kaspresso integration tests#119
ScharfViktor merged 4 commits intomainfrom
kasspresso-integration-tests

Conversation

@ScharfViktor
Copy link
Copy Markdown
Contributor

@ScharfViktor ScharfViktor commented Mar 31, 2026

Changes:

  • Added the first integration test using https://github.com/KasperskyLab/Kaspresso, based on Espresso (for existing tests) and UI Automator (for interacting with elements outside the app)
  • run all existing Espresso tests and skip all failed tests. I'll fix it later after setup CI

How to run test:

or run in the Android studio:

Screen.Recording.2026-03-31.at.15.29.51.mp4

Copilot AI review requested due to automatic review settings March 31, 2026 13:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an initial Kaspresso-based instrumentation “integration test” flow (mixing Espresso/Kakao screens with UI Automator for the external browser), updates AndroidX test dependency versions, and temporarily disables a set of currently failing/flaky existing androidTest tests.

Changes:

  • Add Kaspresso dependency and include src/integrationTest/java in the androidTest source set.
  • Add the first Kaspresso test (LoginScreenTest) plus screen objects for key app/browser UI.
  • Update AndroidX test/espresso versions and mark multiple existing instrumentation tests as @Ignore to unblock local runs.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
opencloudComLibrary/src/main/java/eu/opencloud/android/lib/resources/shares/GetRemoteShareesOperation.kt Adjusts KDoc for constructor params (currently introduces a param-name inconsistency).
opencloudComLibrary/build.gradle Switches AndroidX test core dependency to version-catalog alias.
opencloudApp/src/integrationTest/java/screens/StartScreen.kt Adds Kakao/Kaspresso screen for initial account setup UI.
opencloudApp/src/integrationTest/java/screens/MainScreen.kt Adds Kakao/Kaspresso screen for main activity UI.
opencloudApp/src/integrationTest/java/screens/ManageAccountsDialog.kt Adds screen model for account removal flow (currently uses hardcoded text + naming typo).
opencloudApp/src/integrationTest/java/screens/LoginScreen.kt Adds UI Automator screen for external browser login (currently Chrome-package pinned).
opencloudApp/src/integrationTest/java/eu/opencloud/android/LoginScreenTest.kt Adds first Kaspresso integration test flow for login/remove-account.
opencloudApp/src/androidTest/java/eu/opencloud/android/ui/activity/ReleaseNotesActivityTest.kt Ignores two tests.
opencloudApp/src/androidTest/java/eu/opencloud/android/sharing/shares/ui/ShareFileFragmentTest.kt Ignores entire test class.
opencloudApp/src/androidTest/java/eu/opencloud/android/settings/security/SettingsSecurityFragmentTest.kt Ignores multiple tests.
opencloudApp/src/androidTest/java/eu/opencloud/android/settings/security/PassCodeActivityTest.kt Ignores multiple tests.
opencloudApp/src/androidTest/java/eu/opencloud/android/settings/more/SettingsMoreFragmentTest.kt Ignores one test.
opencloudApp/src/androidTest/java/eu/opencloud/android/settings/logs/SettingsLogsFragmentTest.kt Ignores one test.
opencloudApp/src/androidTest/java/eu/opencloud/android/settings/advanced/SettingsAdvancedFragmentTest.kt Ignores one test.
opencloudApp/src/androidTest/java/eu/opencloud/android/files/details/FileDetailsFragmentTest.kt Ignores entire test class.
opencloudApp/src/androidTest/java/eu/opencloud/android/authentication/LoginActivityTest.kt Adds AccountManager static mocking and ignores multiple tests.
opencloudApp/build.gradle Adds Kaspresso dependency, integration test source dir, and globally forces AndroidX test/espresso versions.
gradle/libs.versions.toml Bumps AndroidX test/espresso versions and adds Kaspresso version/catalog entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread opencloudApp/build.gradle
Comment thread opencloudApp/src/integrationTest/java/screens/ManageAccountsDialog.kt Outdated
Comment thread opencloudApp/src/integrationTest/java/screens/ManageAccountsDialog.kt Outdated
@ScharfViktor ScharfViktor force-pushed the kasspresso-integration-tests branch from 5b844f4 to a957903 Compare March 31, 2026 16:59
Comment thread opencloudApp/src/integrationTest/java/screens/LoginScreen.kt Outdated
@ScharfViktor ScharfViktor force-pushed the kasspresso-integration-tests branch from a957903 to f4294cb Compare April 11, 2026 06:33
@ScharfViktor ScharfViktor force-pushed the kasspresso-integration-tests branch from 1e47a5b to 0467d4f Compare April 22, 2026 10:27
@zerox80
Copy link
Copy Markdown
Contributor

zerox80 commented Apr 22, 2026

adb port leak: you're setting up adb reverse tcp:9200 tcp:9200 in the before block, but you never remove it in the after block! this will leave the port hanging on the emulator and might crash subsequent test runs (address already in use). please make sure to add adbserver.performcmd("adb", listof("reverse", "--remove", "tcp:9200")) in the after block.

@ScharfViktor
Copy link
Copy Markdown
Contributor Author

adb port leak: you're setting up adb reverse tcp:9200 tcp:9200 in the before block, but you never remove it in the after block! this will leave the port hanging on the emulator and might crash subsequent test runs (address already in use). please make sure to add adbserver.performcmd("adb", listof("reverse", "--remove", "tcp:9200")) in the after block.

Thank you 👍 I forgot to do it. Fixed

Copy link
Copy Markdown
Contributor

@individual-it individual-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's merge this for now. This at least allows us to run tests locally with some manual interaction

@ScharfViktor ScharfViktor merged commit f653870 into main Apr 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants