Skip to content

Conversation

@tobiasKaminsky
Copy link
Member

@tobiasKaminsky tobiasKaminsky commented Jan 14, 2026

Original PR: #15424

  • Minor improvements of testing documentation
  • Instrumentation tests now automatically grab the notifications permission
  • DownloadIT now works for all build variants
  • Fixed AbstractIT deleting the wrong account
  • AbstractOnServerIT file deletion now ignores non-empty encrypted folders
  • Fixed some static warnings in AbstractIT and AbstractOnServerIT
  • Fixed incorrect lookup of gradle properties file
  • Tests written, or not not needed

@PhilLab PhilLab changed the title automated_testing_minor_improvements Minor improvements for automated testing Jan 15, 2026
- Fixed instructions for running tests.
  The mentioned example test had been refactored so the given commands were
  not able to locate a test to run.
- Fixed copy/paste errors in test comments
- Documented how to write server-based tests
- Extended formatter setup documentation

Signed-off-by: Philipp Hasper <vcs@hasper.info>
…sion

Before that, when starting individual tests from the command line or from
inside the IDE, they could fail because a dialog asking for the permission
to post notifications was blocking the view.

While we are on it, added a small explanation to the other existing rule.
Without that explanation it might be unclear why this is not also done via
the same GrantPermissionRule used for the notifications.

Signed-off-by: Philipp Hasper <vcs@hasper.info>
Signed-off-by: Philipp Hasper <vcs@hasper.info>
The account type depends on the build flavor, as some of them define their
own R.string.account_type. The test did respect that value when creating
the account in AbstractIT.createAccount(), but not when deleting the
account beforehand.

Signed-off-by: Philipp Hasper <vcs@hasper.info>
TODO: helper function to check mime type for folder should probably move
to the RemoteFile class in the Nextcloud Library.

Signed-off-by: Philipp Hasper <vcs@hasper.info>
- UserAccountManagerImpl#getAccountByName() is never null because since
  #13074 it rather returns an anonymous account. To detect an account
  lookup failure, the type needs to be compared
- The getMaterialSchemesProvider() object returned null for most functions,
  even though they were annotated with @nonnull. Extracted the only
  actually used function getMaterialSchemesForCurrentUser()

Signed-off-by: Philipp Hasper <vcs@hasper.info>
Prior, tests couldn't reach the configured server, because the custom URL
and credentials are simply ignored.

247d085 introduced an alternative parsing of the same values, but from
.gradle/config.properties.

Later, 5fd2e29 came and changed that testInstrumentationRunnerArgument
wasn't taking these values from the gradle.properties but instead from the
otherwise unused config.properties.

Signed-off-by: Philipp Hasper <vcs@hasper.info>
@alperozturk96 alperozturk96 force-pushed the automated_testing_minor_improvements branch from 389a55a to d2c057e Compare January 15, 2026 07:40
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions
Copy link

Codacy

SpotBugs

CategoryBaseNew
Bad practice4343
Correctness7474
Dodgy code257257
Experimental11
Internationalization77
Malicious code vulnerability33
Multithreaded correctness3434
Performance4444
Security1818
Total481481

@github-actions
Copy link

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16286.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@PhilLab PhilLab self-assigned this Jan 15, 2026
@alperozturk96 alperozturk96 merged commit f2e84b3 into master Jan 15, 2026
18 of 21 checks passed
@alperozturk96 alperozturk96 deleted the automated_testing_minor_improvements branch January 15, 2026 08:29
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