Skip to content

carlosvagnoni/JavaAppiumCucumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated Mobile Testing with Java, Appium, and Cucumber

Static Badge Static Badge Static Badge

This project offers a framework and tools for automated mobile testing using Java, Appium, and Cucumber, following Behavior-Driven Development (BDD) best practices and employing the Page Object Model design pattern.

Testing YouTube Mobile App and Demoblaze WebApp 🧪

This suite of tests is aimed at validating scenarios for both a native mobile application, specifically YouTube, and a web application, focusing on demoblaze.com.

Refer to nativeapp/features and webapp/features directories to explore and manage the scenarios for both.

Appium2

Table of Contents 📑

  • JDK 21
  • Appium 2.2.2
  • Appium UIAutomator2 Driver 2.34.2
  • Java-Client 9.0.0
  • Selenium 4.15.0
  • Cucumber 7.14.1
  • pom.xml: Maven configuration file specifying project dependencies.
  • run.bat: Batch script for Windows environment execution.

Directory "src/test/java/com/mobileautomation"

  • TestRunner.java: Cucumber test runner class.

  • hooks/

    • Hooks.java: Cucumber hooks for setup and teardown.
  • nativeapp/

    • features/
      • PlayVideo.feature: Feature file for playing videos on YouTube.
    • pages/
      • Directory containing Page Object Model classes for YouTube app.
    • steps/
      • PlayVideoSteps.java: Step definitions for playing videos on YouTube.
  • utils/

    • DriverManager.java: Utility class for managing drivers.
    • PageObject.java: Base class for Page Object Model.
  • webapp/

    • features/
      • Login.feature: Feature file for demoblaze login.
    • pages/
      • BasePage.java: Page class for demoblaze header and footer.
    • steps/
      • LoginSteps.java: Step definitions for demoblaze login.

Directory "src/test/resources"

  • log4j.properties: Configuration file for logging.
  1. Clone this repository:

    git clone https://github.com/carlosvagnoni/JavaAppiumCucumber.git
    cd JavaAppiumCucumber
  2. Compile the project:

    mvn clean compile
  • Ensure that the Appium server is running.
  • Ensure the device is connected (for real devices) or the emulator is running (for emulated devices) before starting the tests.

Run all the tests:

mvn test

Open report:

start "" "target\reports\mobileautomation.html"

NOTE:

  • Set up the respective environment variables beforehand.
  • On Windows environments, you can directly execute the run.bat file.

If you have any questions or suggestions, feel free to contact me through my social media accounts.

Thank you for your interest in this project!

Releases

No releases published

Packages

No packages published