Skip to content

A real example for learning how to implement UI test automation on mobile apps (WordPress in this case) with the help of PyUIA. (https://github.com/imsardine/pyuia)

License

Notifications You must be signed in to change notification settings

imsardine/pyuia-example-wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyUIA Example - WordPress

Test Case in Natural Language

test/sigin.txt

*** Test Cases ***
Sign in with valid credentials.
    Open the app, and the sign-in screen appears.
    Sign in with a valid username and password, and the main screen appears.
    Go to 'Settings', and check if the username is correct.
    Sign out, and the sign-in screen appears again.
    [Teardown]    Close App

Setup

  1. Clone this repository.

  2. Install Appium and start an Appium server.

    $ appium
    info: Welcome to Appium v1.2.1 (REV 2a4b624a708e580709006b697dc4c9c4e3007863)
    info: Appium REST http interface listener started on 0.0.0.0:4723
    info: LogLevel: debug
  3. Get the APK file of WordPress for Android. You can either extract the APK file from the device, or build it from source.

  4. Install PyUIA and Appium client:

 pip install pyuia
 pip install Appium-Python-Client
 ```

5. Replace placeholders in [test/resource.txt](test/resource.txt) with your credentials and the serialno of your Android device.

 ```
 *** Variables ***
 ${username}       <USERNAME>
 ${password}       <PASSWORD>
 ${device_id}      <SERIALNO>
 ```

6. Provide APK location in [lib/WordPress.py](lib/WordPress.py).

 ```python
 PATH_TO_WORDPRESS_APK = '/path/to/wordpress.apk'
 ```

Run the Test
------------

```shell
export VERSIONER_PYTHON_PREFER_32_BIT=yes
export PYTHONPATH=lib/
pybot --loglevel TRACE --outputdir output test/signin.txt

Then you will get a detailed log file like this.

About

A real example for learning how to implement UI test automation on mobile apps (WordPress in this case) with the help of PyUIA. (https://github.com/imsardine/pyuia)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages