Skip to content

Conversation

@tobiasKaminsky
Copy link
Member

  • Tests written, or not not needed

- 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 <[email protected]>
…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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
- 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 <[email protected]>
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 <[email protected]>
@alperozturk96 alperozturk96 force-pushed the automated_testing_minor_improvements branch from d88f958 to 389a55a Compare January 14, 2026 09:02

val configProps = Properties().apply {
val file = rootProject.file(".gradle/config.properties")
val file = rootProject.file("gradle.properties")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hello

Thank you for the PR.

This breaks the debug login mechanism that we have in AuthenticatorActivity.addDebugLogin.

@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.

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