Learn Web Automation testing using Selenium Webdriver 4.
Maven
as build tool and TestNG
testing framework to run the tests.http://localhost:3000
inside the container in GitHub actions.Not yet a customer link
and register himself on the website.Your Basket
link.Your Basket
link and check the order details and click on Checkout.Thank You
message order confirmation and
delivery message.Start Juice-Shop
website locally, for doing this we will make use of docker-compose-v3-juiceshop.yml
which is
available in the root folder of this project.
Open terminal/command prompt and navigate to the root folder of the project and run the following command:
docker-compose -f docker-compose-v3-juiceshop.yml up -d
Once the Juice-Shop
website is up and running, we are good to run the end-to-end tests using the juice shop website.
There are 2 ways to run the tests, those are as follows:
test-suite\testng-juice-shop.xml
and select Run ...\test-suite\testng-juice-shop.xml
To run the tests in headless mode update the value for headless
property variable to true
mvn clean install -Dsuite-xml=test-suite\testng-juice-shop.xml -Dheadless=true
To run the tests without headless mode(to see the test running in browser) update the value for headless property
variable to
false
mvn clean install -Dsuite-xml=test-suite\testng-juice-shop.xml -Dheadless=false
Stopping the Juice Shop website running in local
docker-compose -f docker-compose-v3-juiceshop.yml down
Start the Selenium Grid in local using the docker-compose-v3-seleniumgrid.yml
file.
Run the following command:
docker-compose -f docker-compose-v3-seleniumgrid.yml up -d
This will start the selenium grid which can be access using http://localhost:4444
.
To run the tests on Selenium Grid using TestNG
:
Right click on test-suite\testng-seleniumgrid-theinternet.xml
and
select Run test-suite\testng-seleniumgrid-theinternet.xml
To run the tests on Selenium Grid using Maven
:
mvn clean install -Dsuite-xml=test-suite\testng-seleniumgrid-theinternet.xml
Stopping the Selenium Grid:
docker-compose -f docker-compose-v3-seleniumgrid.yml down
Start the Juice -Shop
website using following command:
docker-compose -f docker-compose-v3-juiceshop.yml up -d
Start Selenium Grid
using following command:
docker-compose -f docker-compose-v3-seleniumgrid.yml up -d
Run the tests using TestNG
:
Right click on test-suite\testng.xml
and select Run test-suite\testng.xml
Run the tests using Maven
in headless mode:
mvn clean install -Dheadless=true
Stopping the Juice-Shop
website and Selenium Grid
:
docker-compose -f docker-compose-v3-juiceshop.yml down --remove-orphan
There are 2 ways to run the tests, those are as follows:
test-suite\testng-lambdatestecommerce.xml
and
select Run ...\test-suite\testng-lambdatestecommerce.xml
To run the tests in headless mode update the value for headless
property variable to true
mvn clean install -Dsuite-xml=test-suite\testng-lambdatestecommerce.xml -Dheadless=true
To run the tests without headless mode(to see the test running in browser) update the value for headless property
variable to
false
mvn clean install -Dsuite-xml=test-suite\testng-lambdatestecommerce.xml -Dheadless=false
[email protected]
OR ping me on any of the social media sites using the below link:
[email protected]
or ping me on LinkedIn