The project for AppCenter UI tests.
The project consist of test application itself and the UI test for it (AppiumTests folder).
- The application was created in accordance with the guide from the android portal. (https://developer.android.com/training/basics/firstapp).
- The main activity contains some controls that allows to shows the entered text (picture 1).
- If you put your text in textbox and click 'Send' button, you will see the new activity with this text (picture 2).
- If you do the same actions but 'Show as alert' checkbox is activated, you will see the alert with this text (picture 3):
- If you click the 'Reset' button, the textbox and the checkbox will be reseted.
About test: This was written using Appium test framework. The est may be executed either on local machine or in appcenter cloud.
To test this application you should:
-
Install npm package appcenter globally:
npm install -g appcenter-cli
-
Build the apk file of the test application (it must be signed).
-
Execute the follow command in AppiumTests folder:
mvn -DskipTests -P prepare-for-upload package
-
Execute one more commnad in AppiumTests folder:
appcenter test run appium --app "APP_ID" --devices "DEVICE_SET_ID" --app-path PATH_TO_FILE.apk --test-series "master" --locale "en_US" --build-dir target/upload
where APP_ID, DEVICE_SET_ID and PATH_TO_FILE.apk must be replaced with real values. You may get APP_ID and DEVICE_SET_ID values from appcenter if you go to appcenter in Test section and click 'New test run'. You should select necessary devises there and select 'Appium' as test framework. You will see description like this: -
Wait for completion. It may take a few minutes.
-
If you do all correctly, you will see result of the tests in appcenter in Test section: