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:
Right-Click on the 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
mohammadfaisalkhatri@gmail.com
OR ping me on any of the social media sites using the below link:
mohammadfaisalkhatri@gmail.com
or ping me on LinkedInThere are cases when proxies may be required to run the tests, this may happen when the software teams are working in isolation at different places. Residential proxies help in keeping the user’s information safe and help in hiding the real location of the user It acts as a middleman between the device and the internet and keep the users safe from being tracked.
NodeMaven provides high quality proxies with industry-first filtering, super sticky sessions and best customer support. Try out NodeMaven now(Use F86 at checkout to get extra 2GB of proxy)