Demo test with Android Ebay app version 5.9.0 using Java.
- OSX 10.11.6
- Ruby 2.3.0p0
- Appium server: 1.6.3
- Genymotion 2.8.1
- Emulator: Nexus 5, API 21, 5.0.0, 1080x1920
- Run appium server:
appium
. - Run emulator.
- Run
adb devices
to get list of devices. - Navigate to project dir, Run test with gradle:
gradle cleanTest test -Dcucumber.options="--tags @search.search_with_guest_user" -DdeviceName="your_device_name" -Dapp="full_path_to_apk"
Ex:
gradle cleanTest test -Dcucumber.options="--tags @search.search_with_guest_user" -DdeviceName="192.168.56.101:5555" -Dapp="/Users/test/EbayUITestJava/apk/com.ebay.mobile_5.9.0.apk"
- HTML report (with screenshot if scenario is failed) will be located at:
report/index.html
- Project is implemented based on
Cucumber
,PageObject
andPageFactory
: https://github.com/SeleniumHQ/selenium/wiki/PageFactory getPageByClassName(String page)
method inPageManager
will be helpful when retrieving dynamic page:
@Then("^\"([^\"]*)\" is showing up$")
public void isLoaded(String page) {
pageManager.getPageByClassName(page).isLoaded();
}
- Method
List<ProductInfo> getListOfProductNamesAndPrices(int numberOfProduct)
will return list of N products from search result by swiping. ProductInfo
will overrideequals
andhashCode
methods to support getting unique element inHashSet<ProductInfo>