Skip to content

Commit

Permalink
Merge pull request #521 from Satellite-im/sara/minor-suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm authored Nov 7, 2023
2 parents dda6abe + b719f56 commit a946bff
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This automation framework is currently based on the following:
npm install
```

2. Install Appium on a local machine. You can use NPM to install the latest version of appium by running the following shell command:
2. Install Appium on a local machine. You can use NPM to install the latest version of Appium by running the following shell command:

```sh
npm install -g appium@next
Expand All @@ -39,7 +39,7 @@ appium driver install mac2
appium driver install --source=npm appium-windows-driver
```

4. An additional step that is only required in case you are going to run the Appium Tests on Windows is to install the WinAppDriver, used by Appium Windows Driver, to handle the UI from Windows applications and therefore run the tests. You can follow the instructions to install WinAppDriver in the following [link](https://github.com/microsoft/WinAppDriver).
4. An additional step that is only required in case you run the Appium Tests on Windows is to install the WinAppDriver, used by Appium Windows Driver, to handle the UI from Windows applications and, therefore, run the tests. You can follow the instructions to install WinAppDriver in the following [link](https://github.com/microsoft/WinAppDriver).

5. To build the Uplink application to test, clone the [Uplink repository](https://github.com/Satellite-im/Uplink) in your local machine and follow the specific OS install requirements listed on the [README](https://github.com/Satellite-im/Uplink/blob/dev/README.md) from Uplink, depending on your current OS.

Expand All @@ -50,7 +50,7 @@ cargo update
cargo clean
```

Then, execute the following instruction to build the application:
Then, execute the following instructions to build the application:

```sh
# To build the app for Windows (uplink.exe)
Expand All @@ -62,9 +62,9 @@ cargo build --release --package uplink -F production_mode
make dmg
```

7. Wait until the process is completed, and you will find a uplink.exe program (for Windows) or Uplink.app (for MacOS) file in "Uplink/target/release/windows" or "Uplink/target/release/macOS". If you are on Windows, you just have to create an "apps" folder inside the main folder of the testing-uplink folder and then copy the file uplink.exe to the "./apps/" folder. Now, if you are testing on MacOS, you have to copy the Uplink.app file into your Applications folder from your OS.
7. Wait until the process is completed, and you will find an uplink.exe program (for Windows) or Uplink.app (for MacOS) file in "Uplink/target/release/windows" or "Uplink/target/release/macOS". If you are on Windows, you just have to create an "apps" folder inside the main folder of the testing-uplink folder and then copy the file uplink.exe to the "./apps/" folder. Now, if you are testing on MacOS, you have to copy the Uplink.app file into your Applications folder from your OS.

There are tests that can trigger two or more instances of uplink at the same time to test a chat conversation and friend request process as a real environment with more than one user. For now, these tests can only be executed in Windows due to existing limitations on the appium mac2 driver to run more than one instance at the same time. If you would like to try these tests, you would need to copy the uplink,.exe file into the same apps folder with the name "uplink2.exe". So you would have two executables of uplink running on the same apps folder.
Some tests can trigger two or more instances of Uplink simultaneously to test a chat conversation and friend request process in a real environment with more than one user. For now, these tests can only be executed in Windows due to existing limitations on the Appium mac2 driver to run multiple instances simultaneously. If you would like to try these tests, you would need to copy the uplink.exe file into the same apps folder with the name "uplink2.exe". You would have two executables of Uplink running on the same apps folder.

8. Once the application is installed, you can run the tests by using the following commands:

Expand All @@ -79,30 +79,30 @@ npm run windows.app
```

```sh
# To run the chats tests under Windows
# To run the chat tests under Windows
npm run windows.multiremote
```

## Configuration files

This framework uses specific config files for macOS, Windows and Multiremote Chats Tests, see [configs](./config). A Mac App Config File
[`wdio.mac.app.conf.ts`](./config/wdio.mac.app.conf.ts) contains all the WebdriverIO required setup including capabilities, reporters, services and hooks for running MacOS tests locally.
This framework uses specific config files for macOS, Windows, and Multiremote Chats Tests, see [configs](./config). A Mac App Config File
[`wdio.mac.app.conf.ts`](./config/wdio.mac.app.conf.ts) contains all the WebdriverIO required setup, including capabilities, reporters, services and hooks for running MacOS tests locally.

For Windows, there is a similar file [`wdio.windows.app.conf.ts`](./config/wdio.windows.app.conf.ts) containing the same WebdriverIO required setup including capabilities, reporters, services and hooks for running Windows tests locally.
For Windows, there is a similar file [`wdio.windows.app.conf.ts`](./config/wdio.windows.app.conf.ts) containing the same WebdriverIO required setup, including capabilities, reporters, services and hooks for running Windows tests locally.

As well, there are multiremote configuration files for Windows and MacOS (in case that the external appium driver for mac is fixed in the future to allow running more than one instance at the same time), the multiremote configuration files are [`wdio.windows.multiremote.conf.ts`](./config/wdio.windows.multiremote.conf.ts) and [`wdio.mac.multiremote.conf.ts`](./config/wdio.mac.multiremote.conf.ts). The files previously mentioned contain the WebdriverIO required setup including capabilities, reporters, services and hooks for running Windows multiremote tests.
Also, there are multi-remote configuration files for Windows and MacOS (in case the external Appium driver for mac is fixed in the future to allow running more than one instance at the same time), the multiremote configuration files are [`wdio.windows.multiremote.conf.ts`](./config/wdio.windows.multiremote.conf.ts) and [`wdio.mac.multiremote.conf.ts`](./config/wdio.mac.multiremote.conf.ts). The files previously mentioned contain the WebdriverIO required setup, including capabilities, reporters, services, and hooks for running Windows multi-remote tests.

Finally, since we have a GitHub Action setup to run the Appium tests on macOS and Windows, there are two configuration files used to run these tests on CI. Configuration for running MacOS tests on CI is setup in [`wdio.mac.ci.conf.ts`](./config/wdio.mac.ci.conf.ts) and for running Windows tests on CI setup is located in [`wdio.windows.ci.conf.ts`](./config/wdio.windows.ci.conf.ts).
Finally, since we have a GitHub Action setup to run the Appium tests on macOS and Windows, there are two configuration files used to run these tests on CI. Configuration for running MacOS tests on CI is setup in [`wdio.mac.ci.conf.ts`](./config/wdio.mac.ci.conf.ts), and for running Windows tests on CI setup is located in [`wdio.windows.ci.conf.ts`](./config/wdio.windows.ci.conf.ts).

## Locator strategy for native apps

The locator strategy for this Test Automation Framework is to preferably use `accessibilityID`'s. `AccessibilityID`'s make it easy to script once and run on macOS and Windows because most of the apps already have some `accessibilityID`'s.
The locator strategy for this Test Automation Framework is to use `accessibilityID`'s preferably. `AccessibilityID`'s make it easy to script once and run on macOS and Windows because most apps already have some `accessibilityID`'s.

If `accessibilityID`'s can't be used, for example, then for Mac2 driver, -ios class chain or -ios predicate string should be preferred as locators. Finally, the last option to use could be XPATH, which is not preferred because these can be changed without notice for us when new UI elements are added to the screens.

## Improvements to be implemented soon

- Tests running on Ubuntu - Unfortunately, there are no official drivers for Appium to run tests under Ubuntu or any other Linux Distribution. There is only one third-party driver that does not perform expected actions when connected with WebdriverIO. We are still doing research to find the best way to run automated tests under Ubuntu and we will go back to you when we have more news!
- Tests running on Ubuntu - Unfortunately, there are no official drivers for Appium to run tests under Ubuntu or any other Linux Distribution. There is only one third-party driver that does not perform expected actions when connected with WebdriverIO. We are still researching the best way to run automated tests under Ubuntu, and we will get back to you when we have more news!

## Demo Videos

Expand All @@ -116,6 +116,6 @@ Right now, we are working hard to match the existing functionalities from Uplink

## [UI Locators and How to fix tests failing - Guide](./docs/ARIA_LABELS.md).

We created an extensive document inside this repository to share some tips and guides that will help you to avoid breaking tests when updating an Aria Label from Uplink, and to contribute to add new aria labels on UI elements. At the same time, this document contains a guide on how to update tests affected for code changes on Uplink. Finally, in order to have a better understanding on the impact of these UI Locators, a detailed description on the structure of the screenobject and spec files from the testing framework is described inside the following [document](./docs/ARIA_LABELS.md).
We created an extensive document inside this repository to share some tips and guides that will help you avoid breaking tests when updating an Aria Label from Uplink and contribute to adding new Aria labels on UI elements. At the same time, this document contains a guide on updating tests affected for code changes on Uplink. Finally, to have a better understanding of the impact of these UI Locators, a detailed description of the structure of the screen object and spec files from the testing framework is described inside the following [document](./docs/ARIA_LABELS.md).

Any contributions to the repository are welcome!

0 comments on commit a946bff

Please sign in to comment.