Skip to content

End-to-end (E2E) mobile testing project using Javascript with Codeceptjs, Appium, BDD with Cucumber and Page Object Model (POM). Functional UI tests for the Farfetch application.

Notifications You must be signed in to change notification settings

henriquekoaski/appium-codeceptjs-mobile-tests

Repository files navigation

Appium-Codeceptjs-Mobile-Tests

This repository contains automated functional end-to-end (E2E) tests for the Farfetch app, an e-commerce platform with a primary focus on luxury fashion products.

🌐 Access the app through this link 👉 Farfetch App

image

🧭 Overview

In this project, I implement automated functional end-to-end (E2E) tests using Codeceptjs with JavaScript, following BDD practices with the Gherkin language using Cucumber tool, and applying the Page Object Model (POM) design pattern. The goal is to ensure the quality and reliability of the Farfetch Application.

 

🛠️ Technologies and Tools Used

  • JavaScript
  • CodeceptJS
  • Node.js
  • npm
  • Appium
  • Android Studio
  • Cucumber
  • Gherkin
  • BDD (Behavior-Driven Development)
  • Page Object Model (POM)

 

⚙️ Structure of the Project

This project was designed with a focus on scalability and ease of maintenance for both existing and future test scenarios.

The tests are written in Gherkin language using the Cucumber tool, which enables the creation of test scenarios following the BDD (Behavior Driven Development) approach. These files can be found in the features folder.

image  

The step definitions are written in JavaScript with CodeceptJS, a powerful end-to-end testing framework that simplifies writing tests using a high-level, readable syntax, and are responsible for executing the steps described in each test scenario defined in the features folder. All step definition files are organized in the step_definitions folder.

image  

This project follows the Page Object Model (POM) pattern, a best practice that improves code organization and maintainability. Inside the views folder, you will find variables that containing selectors to identify HTML elements, and functions implemented in Codeceptjs + JavaScript to perform the actions needed for the functional tests.

image image

 

🧪 Automated Test Scenarios in this project

In this project, I have automated three test scenarios taken from the list above:

  • 1. Change to an available language

    Tests changing to an available language such as "Spanish", "Russian", "Chinese", among others, verifying that the application changed to the correct language.

    image

    Test Results:

    image

     

  • 2. Change to an available region

    Tests change to an available region, such as "Brazil", "Canada", "Japan", among others, verifying that the application changed to the correct region.

    image

    Test Results:

    image

     

  • 3. Search product by brand name

    Tests searching by various brands, including "Gucci" and "Nike", validating the correct display of products from those brands.

    image

    Test Results:

    image

     

    🧪✅ — All tests passed successfully 🧪✅ Tests

     

🔬 Running Tests Locally

To run the tests locally, please follow the steps below:

Prerequisites

  1. Download the following tools (make sure you get an updated version):

Appium Server Settings

  1. Open Appium and enter the following setting:
  • Remote Host : 127.0.0.1
  • Remote Port : 4723

image


Android Studio

  1. Create a device and open it:
  • Create a device following: Tools -> Device Manager -> Create Device
image  
  • Open the emulator device
image  

Code Editor

Inside your code editor, open the terminal and run the following commands:

  1. Clone this GitHub repository:
git clone https://github.com/henriquekoaski/appium-codeceptjs-mobile-tests.git

  1. Navigate to the project directory:
cd appium-codeceptjs-mobile-tests

  1. Install the dependencies:
npm install

APK File

  1. Download the APK file through this Link
  • For the tests carried out in this repository, version 5.32.0 was used

  1. "In the 'codeceptj.conf.js' file, into the 'Appium > app' section, update the file path to specify the directory where your APK file is stored on your local machine."
image

🚀 Running

To run automated tests on your computer, make sure all of the following tools are open:

  • Appium Server GUI (Appium Desktop)
  • Android Studio (Emulator)

After configuring the settings, execute the tests using the following command:

npm test

 

📝 Tests Results

image

About

End-to-end (E2E) mobile testing project using Javascript with Codeceptjs, Appium, BDD with Cucumber and Page Object Model (POM). Functional UI tests for the Farfetch application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published