- Project Architecture
- Run test Locally via testng from
src/test/resources/test-suites/flight-reservation-parallel-execution.xml
- How to run test from Target folder
- Running Tests from target using env variables
- Issue this command.
mvn clean package -DskipTests
. You should seedocker-resources
undertarget
. docker-resources
should contain following directories. Ensure that files are present under these directories.- config
- libs
- test-data
- test-suites
- Go to
docker-resources
via command line. Then issue this command. One of them should work.java -cp 'libs/*' org.testng.TestNG test-suites/flight-reservation.xml
java -cp libs/* org.testng.TestNG test-suites/flight-reservation.xml
java -cp "libs/*" org.testng.TestNG test-suites/flight-reservation.xml
- Windows Users
- Try in PS
- Try in regular command prompt. (
cmd
)
- Mac/Linux Users
- Try via
bash
- Try via
-
Go to
docker-resources
via command line. Then issue this command. One of them should work. -
Running a test suite
java -cp 'libs/*' org.testng.TestNG test-suites/flight-reservation.xml
- Running a test suite with specific thread count
java -cp 'libs/*' org.testng.TestNG -threadcount 2 test-suites/flight-reservation.xml
- TestNG by default creates test-output directory. You can change it with -d option.
java -cp 'libs/*' org.testng.TestNG -threadcount 2 -d result test-suites/flight-reservation.xml
- To pass the browser option
java -Dbrowser=chrome -cp 'libs/*' org.testng.TestNG test-suites/flight-reservation.xml
- To run the tests using Selenium Grid
java -Dselenium.grid.enabled=true -Dselenium.grid.hubHost=localhost -cp 'libs/*' org.testng.TestNG test-suites/flight-reservation.xml
- To run the tests using Selenium Grid with specific thread count
java -Dselenium.grid.enabled=true -Dselenium.grid.hubHost=localhost -cp 'libs/*' org.testng.TestNG test-suites/flight-reservation.xml -threadcount 2
- Log4j
- extent report