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
If you want to change the page to do web scraping to its header, go to App Class
and change the BASE_URL
- Selenium 4
- TestNG
- Log4J2
- Allure
- JsonSimple
- 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)
- JDK 11 (Environment variable)
- Maven (Environment variable)
- Allure (Environment variable)
- Docker (Optional if you want to run it remotely)
- IDE (ex. IntelliJ)
- Download and save the folders where you want. Look at the links above.
- Take in mind the
path
where you are saving your folders **that contains jdk. - Copy jdk path.
- On windows, in search bar, type
environment variables
and click onEdit the system environment variables
.
- In the
System properties
window, clickenvironment variables
. - In
Environment variables
window inAdvanced tab
, inSystem variables
section, double clickPath
. - In
Edit environment variable
clickNew
button and paste the path that contains jdk, then clickOk
. - Close the open windows and that's all to install JDK 🥳.
Installed:
- Chrome
- Firefox
- Microsoft Edge
- Click on the code button in this repository
- Select the Download Zip option
- Extract the .zip file with the Extract here option
- Place the project folder on the desired location
- Select the folder when you would like clone the project
- Open git bash, copy and paste the following command
git clone https://github.com/Diegocortes15/itsense-qa-assessment.git
Open the project with the desired IDE, then run the following command.
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
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
To open allure report run the following command
allure serve target/allure-results
In our Github Actions or Azure DevOps you can see some details where you can find artifacts related with the test execution
- Allure Report (Remember open it with a server like Live Server)
- Specs (Here you can find the text scraped from the header tag)
- Logs (Information related with test execution)