项目作者: nathiyatesting

项目描述 :
Mobile Automation Framework for "the Score" Android App
高级语言: HTML
项目地址: git://github.com/nathiyatesting/Mobile-Android.git
创建时间: 2019-05-01T18:29:10Z
项目社区:https://github.com/nathiyatesting/Mobile-Android

开源协议:

下载


Core Framework

  1. The core framework consists of the Page object Model. For each of the App page,
  2. I have created separate page class. The page specific functionalities are implemented as
  3. reusable methods inside the page class.
  4. I have also created a class called BasePage which contains some of the utility methods
  5. like WebDriver Wait, Send Keys,Tap etc.

Page Class package: com.game.pages

  1. BasePage
  2. WelcomePage
  3. SigninPage
  4. LeaguePage
  5. NBABasketBallPage
  6. LeaderPage
  7. PlayerPage
  8. AndroidCapabilities

TestNG

  1. I have used the TestNG Framework to create & execute the Automation Test case.
  2. Appropriate Annotations are being within the Test case.
  3. Test case is located in folder:src/test/java. The name of the test case is RandomPlayer_TC001.

How to execute the Test case

  1. Open the RandomPlayer_TC001 Test case file from the src/test/java .Right Click and
  2. choose the option TestNG Test to execute the Test case
  3. Test data is maintained in a separate excel spreadsheet as the test data
  4. is parameterized in the Test case
  5. Test data sheet is located in folder: src/main/resources
  6. The Score.Apk file is located inthe folder: src/main/resources

Logging

  1. For the Logging and Debugging purpose, I have implemented the Log4J Framework.
  2. All the log information from the test case execution will be captured using the Log4J.
  3. The log4j2.xml is located in the properties folder. Place the log4j2.xml file into the classpath. Only then all the log statements will get logged to console.

MacOS Setup/Consideration:

  1. Please follow the below steps to setup the MacOS test infrastructure
  2. o Download and Build the iOS App in Local Machine using XCODE
  3. o Do the Simulator/Real Device Setup
  4. o Download the Appium Desktop
  5. o Create Desired Capabilities for iOS
  6. Please follow the below steps to execute the test case in Mac Laptop
  7. o Use Appium Inspector to Identify the iOS Locators for the below Pages,
  8. o Add the iOS Locators using the @iOSFindby in the below pages
  9. WelcomePage
  10. SigninPage
  11. LeaguePage
  12. NBABasketBallPage
  13. LeaderPage
  14. PlayerPage
  15. AndroidCapabilities

Below are the list of things that differ from Android and IOS

  1. 1. Capability Setting for IOS
  2. cap.setCapability(MobileCapabilityType.DEVICE_NAME, "iphone 6");
  3. cap.setCapability(MobileCapabilityType.PLATFORM_NAME, "ios");
  4. cap.setCapability(MobileCapabilityType.AUTOMATION_NAME,AutomationName.IOS_XCUI_TEST);
  5. cap.setCapability(MobileCapabilityType.APP, "//users//xcodeclub//Desktop//theScore.app");
  6. driver=new IOSDriver<IOSElement>(new URL("http://127.0.0.1:4723/wd/hub"), cap)
  7. 2. Page Factory Pattern for the IOSElements will be
  8. @iOSBy annotation followed by the identified locator value for the webElement
  9. 3. Scrolling
  10. Scrolling in ios can be done by using the Dimension class.