|
| 1 | +# Android Scenario Testing |
1 | 2 |
|
2 | | -[](https://github.com/owncloud/android-scenario-testing/actions/workflows/e2e.yml) |
| 3 | +<!-- OSPO-managed README | Generated: 2026-04-16 | v2 --> |
3 | 4 |
|
4 | | -Scenarios contained in feature files written in Gherkin language. |
5 | | -Available scenarios can be found |
6 | | -[here](src/test/resources/io/cucumber). |
| 5 | +[](LICENSE) [](https://kiteworks.com/opensource) |
7 | 6 |
|
8 | | -Defined for the [ownCloud Android app](https://github.com/owncloud/android) |
| 7 | +This repository contains end-to-end scenario tests for the [ownCloud Android app](https://github.com/owncloud/android). Tests are written as Gherkin feature files using Cucumber for step interpretation and Appium for device interaction. The test suite covers core functionality including login, file operations, sharing, and Spaces, and runs against both oCIS and ownCloud 10 backends. |
9 | 8 |
|
| 9 | +## Part of Mobile (Android) |
10 | 10 |
|
11 | | -## Global overview |
| 11 | +This repository provides the automated end-to-end test suite for the [ownCloud Android app](https://github.com/owncloud/android). It is used in CI pipelines to validate app behavior against real server backends. |
12 | 12 |
|
13 | | -- Scenarios are defined with [Gherkin |
14 | | -Syntax](https://cucumber.io/docs/gherkin/). |
| 13 | +## Getting Started |
15 | 14 |
|
16 | | -- Steps are interpreted by [Cucumber](https://cucumber.io/). |
| 15 | +Follow the steps below to set up and run the end-to-end test suite. |
17 | 16 |
|
18 | | -- Step implementation language: |
19 | | -[Java](https://docs.oracle.com/javase/7/docs/) |
| 17 | +### Prerequisites |
20 | 18 |
|
21 | | -- Device interaction with [Appium](http://appium.io/) |
| 19 | +- An [Appium](https://appium.io/) instance running and reachable |
| 20 | +- At least one Android device or emulator attached (verify with `adb devices`) |
| 21 | +- `$ANDROID_HOME` environment variable set to the Android SDK folder |
22 | 22 |
|
| 23 | +### Running Tests |
23 | 24 |
|
24 | | - |
| 25 | +1. Build the [ownCloud Android app](https://github.com/owncloud/android) from the target branch using the `buildAPK` script in `buildapk/` |
| 26 | +2. Set environment variables: |
| 27 | + - `$OC_SERVER_URL` (mandatory) - ownCloud server URL |
| 28 | + - `$APPIUM_URL` (optional, defaults to `localhost:4723`) |
| 29 | + - `$UDID_DEVICE` (optional) - device/emulator ID |
| 30 | + - `$BACKEND` (optional, defaults to `oCIS`) - `oCIS` or `oC10` |
| 31 | +3. Run the `executeTests` script |
25 | 32 |
|
26 | | -## Get the code |
| 33 | +## Documentation |
27 | 34 |
|
28 | | -- With git: |
| 35 | +- Feature files are in `src/test/resources/io/cucumber/` |
| 36 | +- [Appium documentation](https://appium.io/docs/en/about-appium/getting-started/) |
| 37 | +- [Cucumber documentation](https://cucumber.io/docs/gherkin/) |
29 | 38 |
|
30 | | -`git clone https://github.com/owncloud/android-scenario-testing.git` |
| 39 | +## Reference |
31 | 40 |
|
32 | | -- Download a [zip |
33 | | -file](https://github.com/owncloud/android-scenario-testing/archive/master.zip) |
| 41 | +Key details from the project's test architecture and configuration: |
34 | 42 |
|
35 | | -## Requirements |
| 43 | +### Architecture |
36 | 44 |
|
37 | | -Different requirements: |
| 45 | +Tests use [Gherkin Syntax](https://cucumber.io/docs/gherkin/) scenarios interpreted by [Cucumber](https://cucumber.io/), with step implementations in Java and device interaction via [Appium](http://appium.io/). |
38 | 46 |
|
39 | | -* `Appium` instance running and reachable. Check this [link](https://appium.io/docs/en/about-appium/getting-started/?lang=en) to get futher info about Appium. |
| 47 | +### Environment Variables |
40 | 48 |
|
41 | | -* At least, one device/emulator attached and reachable via adb. Check command |
42 | | -`adb devices` to ensure `Appium` will get the device reference to |
43 | | -interact with it. |
| 49 | +| Variable | Required | Default | Description | |
| 50 | +|---|---|---|---| |
| 51 | +| `$OC_SERVER_URL` | Yes | -- | ownCloud server URL to test against | |
| 52 | +| `$APPIUM_URL` | No | `localhost:4723` | Appium server URL | |
| 53 | +| `$UDID_DEVICE` | No | -- | Device/emulator ID (from `adb devices`) | |
| 54 | +| `$BACKEND` | No | `oCIS` | Backend type: `oCIS` or `oC10` | |
44 | 55 |
|
45 | | -* The environment variable `$ANDROID_HOME` needs to be correctly set up, |
46 | | -pointing to the Android SDK folder |
| 56 | +### Backend-Specific Tags |
47 | 57 |
|
48 | | -## How to test |
| 58 | +Since not all tests are suitable for both backends, tests are tagged: |
49 | 59 |
|
| 60 | +- `@nooc10` -- tests for oCIS only, not suitable for oC10 |
| 61 | +- `@noocis` -- tests for oC10 only, not suitable for oCIS |
50 | 62 |
|
51 | | -### 1. Build app |
| 63 | +Example: `./executeTests -t "not @ignore and not @noocis"` runs tests suitable for oCIS. |
52 | 64 |
|
53 | | -First, build the [app](https://github.com/owncloud/android) from the expected branch/commit to get the test object. |
| 65 | +### Test Results |
54 | 66 |
|
55 | | -The [buildAPK](https://github.com/owncloud/android-scenario-testing/blob/master/buildapk/buildAPK.sh) script will build the app by using the qa variant available in the app. Such variant: |
| 67 | +Reports in HTML and JSON formats are generated in the `target/` directory. |
56 | 68 |
|
57 | | -- will disable welcome wizard |
58 | | -- will disable the release notes |
59 | | -- will set basic auth as forced authentication method, required to execute the test suites |
| 69 | +### Version Matrix |
60 | 70 |
|
61 | | -Besides of that, the script also: |
| 71 | +| Component | Version | |
| 72 | +|---|---| |
| 73 | +| Cucumber | 7.31.0 | |
| 74 | +| Appium | 3.1.0 | |
| 75 | +| Appium UIAutomator2 Driver | 4.2.3 | |
| 76 | +| Java Client | 9.4.0 | |
62 | 77 |
|
63 | | -- builds a release-signed apk with the given keystore path and pass (check script variables) |
64 | | -- moves the final artifact to the correct place (`/src/test/resources` folder in the current structure) |
| 78 | +## Community & Support |
65 | 79 |
|
66 | | -As commented, check the script's variables for the proper setup in your own environment or CI system. |
| 80 | +**[Star](https://github.com/owncloud/android-scenario-testing)** this repo and **Watch** for release notifications! |
67 | 81 |
|
68 | | -In the current repository there will be always an `owncloud.apk` file located in `/src/test/resources`, as example or fallback. |
| 82 | +- [ownCloud Website](https://owncloud.com) |
| 83 | +- [Community Discussions](https://github.com/orgs/owncloud/discussions) |
| 84 | +- [Matrix Chat](https://app.element.io/#/room/#owncloud:matrix.org) |
| 85 | +- [Documentation](https://doc.owncloud.com) |
| 86 | +- [Enterprise Support](https://owncloud.com/contact-us/) |
| 87 | +- [OSPO Home](https://kiteworks.com/opensource) |
69 | 88 |
|
70 | | -### 2. Execute tests |
| 89 | +## Contributing |
71 | 90 |
|
72 | | -The script `executeTests` will launch the tests. The following environment variables must be set in advance |
| 91 | +We welcome contributions! Please read the [Contributing Guidelines](CONTRIBUTING.md) |
| 92 | +and our [Code of Conduct](CODE_OF_CONDUCT.md) before getting started. |
73 | 93 |
|
74 | | - $OC_SERVER_URL (mandatory): URL of ownCloud server to test against |
75 | | - $APPIUM_URL (optional): Appium server URL. |
76 | | - If Appium Server is not specified, will be used "localhost:4723" |
77 | | - $UDID_DEVICE (optional): ID of the device/simulator to execute the tests onto. |
78 | | - This ID could be get by executing `adb devices` |
79 | | - $BACKEND (optional): oCIS or oC10. If not specified, will be used oCIS. |
| 94 | +### Workflow |
80 | 95 |
|
81 | | -The script needs some parameters. Check help `executeTests -h` |
| 96 | +- **Rebase Early, Rebase Often!** We use a rebase workflow. Always rebase on the target branch before submitting a PR. |
| 97 | +- **Dependabot**: Automated dependency updates are managed via Dependabot. Review and merge dependency PRs promptly. |
| 98 | +- **Signed Commits**: All commits **must** be PGP/GPG signed. See [GitHub's signing guide](https://docs.github.com/en/authentication/managing-commit-signature-verification). |
| 99 | +- **DCO Sign-off**: Every commit must carry a `Signed-off-by` line: |
| 100 | + ``` |
| 101 | + git commit -s -S -m "your commit message" |
| 102 | + ``` |
| 103 | +- **GitHub Actions Policy**: Workflows may only use actions that are (a) owned by `owncloud`, (b) created by GitHub (`actions/*`), or (c) verified in the GitHub Marketplace. |
82 | 104 |
|
| 105 | +## Security |
83 | 106 |
|
84 | | -To execute all tests but the ignored ones (or any other tagged ones): |
| 107 | +**Do not open a public GitHub issue for security vulnerabilities.** |
85 | 108 |
|
86 | | - export UDID_DEVICE=emulator-5554 |
87 | | - export OC_SERVER_URL=https://my.owncloud.server |
88 | | - export APPIUM_URL=localhost:4723 |
89 | | - export BACKEND=oCIS |
90 | | - ./executeTests -t "not @ignore" |
| 109 | +Report vulnerabilities at **<https://security.owncloud.com>** -- see [SECURITY.md](SECURITY.md). |
91 | 110 |
|
92 | | -The execution will display step by step how the scenario is being executed. |
| 111 | +Bug bounty: [YesWeHack ownCloud Program](https://yeswehack.com/programs/owncloud-bug-bounty-program) |
93 | 112 |
|
94 | | -** the `not @ignore` option is set by default |
| 113 | +## License |
95 | 114 |
|
96 | | -More info in [Cucumber reference](https://cucumber.io/docs/cucumber/api/) |
| 115 | +This project is licensed under the [MIT](LICENSE). |
97 | 116 |
|
98 | | -**NOTE**: Since there are two kinds of backends available (oC10, oCIS), not all tests are suitable to be executed over both. Those tests have been tagged with: |
| 117 | +## About the ownCloud OSPO |
99 | 118 |
|
100 | | -- `@nooc10`: tests to be executed only over oCIS, not suitable for oC10. |
101 | | -- `@noocis`: tests to be executed only over oC10, not suitable for oCIS. |
| 119 | +The [Kiteworks Open Source Program Office](https://kiteworks.com/opensource), operating under |
| 120 | +the [ownCloud](https://owncloud.com) brand, launched on May 5, 2026, to steward the open source |
| 121 | +ecosystem around ownCloud's products. The OSPO ensures transparent governance, license compliance, |
| 122 | +community health, and sustainable collaboration between the open source community and |
| 123 | +[Kiteworks](https://www.kiteworks.com), which acquired ownCloud in 2023. |
102 | 124 |
|
103 | | -It's important to execute the tests with the mentioned tags to avoid wrong positives. Example commands: |
| 125 | +- **OSPO Home**: <https://kiteworks.com/opensource> |
| 126 | +- **GitHub**: <https://github.com/owncloud> |
| 127 | +- **ownCloud**: <https://owncloud.com> |
104 | 128 |
|
105 | | -`./executeTests -t "not @ignore and not @noocis"`<br> |
106 | | -This command will execute tests that are not ignored and suitable for oCIS. If this command is run over an oC10 instance, some tests will fail. |
| 129 | +For questions about the OSPO or licensing, contact ospo@kiteworks.com. |
107 | 130 |
|
108 | | -`./executeTests -t "not @ignore and not @nooc10"`<br> |
109 | | -This command will execute tests that are not ignored and suitable for oC10. If this command is run over an oCIS instance, some tests will fail. |
| 131 | +### License Migration to Apache 2.0 |
110 | 132 |
|
111 | | -Every [feature file](https://github.com/owncloud/android-scenario-testing/tree/master/src/test/resources/io/cucumber), and every rule inside every feature file is also tagged, for isolated execution just in case. |
| 133 | +The OSPO is driving a strategic relicensing of ownCloud repositories toward the |
| 134 | +[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), following |
| 135 | +the [Apache Software Foundation's third-party license policy](https://www.apache.org/legal/resolved.html). |
112 | 136 |
|
113 | | -## Results |
| 137 | +Individual repositories will migrate as their audit is completed. The LICENSE file |
| 138 | +in each repo reflects its **current** license status (not the target). |
114 | 139 |
|
115 | | -In the folder `target`, you will find a report with the execution results in html and json formats. |
| 140 | +**Current license: MIT** (Category A per Apache policy -- permissive, compatible with Apache-2.0). |
116 | 141 |
|
| 142 | +Migration prerequisites for this repository: |
117 | 143 |
|
118 | | -## Versioning |
119 | | - |
120 | | -Up to date: 18/Nov/2025 |
121 | | - |
122 | | -|| | |
123 | | -|:-- |:------:| |
124 | | -| [Cucumber version](https://cucumber.io/docs/installation/java/) | 7.31.0 | |
125 | | -| [Appium version](https://github.com/appium/appium/releases)| 3.1.0 | |
126 | | -| [Appium uiautomator2 driver version](https://github.com/appium/appium-uiautomator2-driver/releases)| 4.2.3 | |
127 | | -| [Java client version](https://github.com/appium/java-client/releases) | 9.4.0 | |
128 | | - |
129 | | -**Note**: This repository was forked from [Cucumber-java |
130 | | -skeleton](https://github.com/cucumber/cucumber-java-skeleton) |
131 | | -repository, which contains the base skeleton to start working. |
| 144 | +- **CLA/DCO coverage**: All past contributors must have signed agreements permitting relicensing |
| 145 | +- **Header updates**: All source file headers must be updated from MIT to Apache-2.0 notice |
| 146 | +- **Dependency audit**: Verify no incompatible transitive dependencies |
0 commit comments