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

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.
- JavaScript
- CodeceptJS
- Node.js
- npm
- Appium
- Android Studio
- Cucumber
- Gherkin
- BDD (Behavior-Driven Development)
- Page Object Model (POM)
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.

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.

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.


In this project, I have automated three test scenarios taken from the list above:
-
Tests changing to an available language such as "Spanish", "Russian", "Chinese", among others, verifying that the application changed to the correct language.
-
Tests change to an available region, such as "Brazil", "Canada", "Japan", among others, verifying that the application changed to the correct region.
-
Tests searching by various brands, including "Gucci" and "Nike", validating the correct display of products from those brands.
🧪✅ — All tests passed successfully
🧪✅
To run the tests locally, please follow the steps below:
- Download the following tools (make sure you get an updated version):
- Open Appium and enter the following setting:
- Remote Host : 127.0.0.1
- Remote Port : 4723
- Create a device and open it:
- Create a device following: Tools -> Device Manager -> Create Device

- Open the emulator device

Inside your code editor, open the terminal and run the following commands:
- Clone this GitHub repository:
git clone https://github.com/henriquekoaski/appium-codeceptjs-mobile-tests.git
- Navigate to the project directory:
cd appium-codeceptjs-mobile-tests
- Install the dependencies:
npm install
- Download the APK file through this Link
- For the tests carried out in this repository, version 5.32.0 was used
- "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."

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
