Skip to content

Diegocortes15/ui-automation-challenge-js

Repository files navigation

Automation Challenge

Tutorial to run the project

Prerequisites

JDK Java

  1. Make sure you have installed JDK Java.

JDK Java

  1. Take in mind the path when you are saving Java folder that contains jdk.
  2. Copy jdk path.

JDK1

  1. On windows, in search bar, type environment variables and click on Edit the system environment variables.

environment variables

  1. In the System properties window, click environment variables.
  2. In Environment variables window in Advanced tab, in System variables section, double click Path.
  3. In Edit environment variable click New button and paste the path that contains jdk, then click Ok.
  4. Close the open windows and that's all to install JDK 🥳.

environment variables (2)

Node.js

  1. You need must have Node.js installed (Node.js LTS version recommended)

  2. When you are installing Node.js, make sure to check the option

    • Automatically install the necesary tools. Note that this will also install Chocolatey. The script will pop-up in a new window after the installation completes.

nodeInstall

Browsers

Installed:

  • Chrome
  • Firefox
  • MicrofoftEdge

Visual Studio Code

You must have Visual Studio Code installed

Once you have installed Visual Studio Code you need to install a couple of plugins to help you set up the framework.

These plugins are Prettier and ESlint

🤔 How to install Prettier in Visual Studio Code?

  1. Go to Visual Studio Code application.
  2. On left sidebar in Visual Studio Code, click Extensions or press Crtl+Shift+X.
  3. In the search, type Prettier and click Prettier - Code formatter, then click on install.
  4. That's all to install Prettier in VSCode 🥳

prettier-gif

🤔 How to install ESlint in Visual Studio Code?

  1. Go to Visual Studio Code application.
  2. On left sidebar in Visual Studio Code, click Extensions or press Crtl+Shift+X.
  3. In the search, type Prettier and click ESlint, then click on install.
  4. That's all to install ESlint in VSCode 🥳

eslint-gif

Download and open project

Download project

  1. Click on the code button in this repository
  2. Select the Download Zip option
  3. Extract the .zip file with the Extract here option
  4. Place the project folder on the desired location

Open project

  • First way: Right click on the folder and open it with Visual Studio Code
  • Second way: Open Visual Studio code and drag the folder in Visual Studio Code Window
  • Third way: Open Visual Studio, on top bar, click File and Open Folder or press Ctrl+K Ctrl+O, then choose the folder where you save it

openProject-gif

Running project

  • In Visual Studio Code, open new terminal with Ctrl+Shift+` or Ctrl+Shift+ñ or on top bar click Terminal, then click New Terminal

openTerminal

Type the following commands to run the following test cases

  • Type npm install and wait all packages will be downloaded
npm install

Running test cases by user story

📗 Story WIO-0002

📗 Stories
📗 WIO-0001 📗 WIO-0002 📗 WIO-0013
📗 WIO-0015 📗 WIO-0018
npx wdio --spec tests/specs/WIO-0002.spec.js

Running all test cases at the same time

npm run test

Open Allure report

npx allure open

Open Allure report