IT Sense QA Assessment

This repository presents the solution to problem 2.

Problema 2: La anterior empresa de manufactura requiere implementar un proceso de QA por medio del web scraping con el fin de monitorear la información publicada en su página web.

Solución: Implementar un algoritmo en el lenguaje de programación de su preferencia que permita hacer una consulta get a cualquier página web publica de internet con el fin de imprimir su encabezado.

You can see the information scraped in the artifact 📦 specsResults or 📦 allureReport

image

image

If you want to change the page to do web scraping to its header, go to App Class and change the BASE_URL

image

Dependencies used

  • Selenium 4
  • TestNG
  • Log4J2
  • Allure
  • JsonSimple

Pattern design used

  • Page Object Model (Thinking in a scalable and dynamic web automation framework)
  • Factory (Applied in WebDriverFactory Class for create difference webdrives intances with the requested browser)

Prerequisites to run the project

  • JDK 11 (Environment variable)
  • Maven (Environment variable)
  • Allure (Environment variable)
  • Docker (Optional if you want to run it remotely)
  • IDE (ex. IntelliJ)

How set environment variables

  1. Download and save the folders where you want. Look at the links above.
  2. Take in mind the path where you are saving your folders **that contains jdk.
  3. Copy jdk path.
  4. 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)

Browsers

Installed:

  • Chrome
  • Firefox
  • Microsoft Edge

Download and open project

Workaround 1

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

Workaround 2 - Git-bash

  1. Select the folder when you would like clone the project
  2. Open git bash, copy and paste the following command
git clone https://github.com/Diegocortes15/itsense-qa-assessment.git

image

Run project ⚠

Open the project with the desired IDE, then run the following command.

Local ⚠

To run the project locally you make sure that in App Class the PLATFORM variable must be set as local then in folder project you can run the following command.

mvn clean verify

Remote ⚠

Note You need Docker installed on your machine to run the following commands!

To run the project remotely you make sure that in App Class the PLATFORM variable must be set as remote then you must run the docker container with the following command

docker-compose -f docker/docker-compose.yml up

Then in another terminal you must use the following container to run our tests

mvn clean verify

Once our tests have finished you must run the following command to stop our docker container

docker-compose -f docker/docker-compose.yml down

Open allure report

To open allure report run the following command

allure serve target/allure-results

isAssessment

Open Artifacts

In our Github Actions or Azure DevOps you can see some details where you can find artifacts related with the test execution

  1. Allure Report (Remember open it with a server like Live Server)
  2. Specs (Here you can find the text scraped from the header tag)
  3. Logs (Information related with test execution)

image