Skip to content

Mobile automation framework built using Appium + Python with Page Object Model and BDD integration via pytest-bdd

Notifications You must be signed in to change notification settings

alhajiry/mobile-automation-appium-python

Repository files navigation

This mobile automation framework contains test cases to test Blibli Android application. Blibli is B2C ecommerce developed by Indonesian company and operating in Indonesian market.

To run the test, you need to have an Android emulator/physical device with Blibli application installed. The Blibli Android application can be downloaded from Playstore : Blibli Android Playstore

If there is a need to change the device for testing, you can change it by changing the options.device_name in the code below

def get_driver(self):
options = AppiumOptions()
options.platform_name = 'Android'
options.automation_name = 'UiAutomator2'
options.device_name = 'emulator-5554'
options.noReset = True
options.platform_version = '15'
options.appPackage = 'blibli.mobile.commerce'
options.appActivity = 'blibli.mobile.ng.commerce.core.home_page.view.HomePageActivity'

In order to run the test, you need to have python with version 3.13.1 installed For Windows, you can download it in here : https://www.python.org/ftp/python/3.13.1/python-3.13.1-amd64.exe

Install the required depedencies

pip install -r requirements.txt

You will need to create .env file in the root directory and add your Blibli account username and password

BLIBLI_USERNAME = YOUR_USERNAME
BLIBLI_PASSWORD = YOUR_SECRET

Another alternative, you can run the test without adding .env by do a manual login to the test devices, you can then disable the login step (the first test step) in the marketplace.feature file.

Run the test using this command

Run using command 'pytest'

*Please note that this framework is built using Windows machine, for Linux/MacOS there could be an adjustment needed. In addition the Blibli application have safeguard in place to disable emulator/automation software to checkout a product from their marketplace. Therefore at the end of the test, there will be an error related to that which is expected.

If there is any question please mail me at [email protected]

About

Mobile automation framework built using Appium + Python with Page Object Model and BDD integration via pytest-bdd

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published