This is an Assignment project to showcase same problem statement solution with TESTNG framework that was first resolved with use of Cucumber (BDD).
-
testng_web.xml - helps run web ui tests as per user input on either chrome or firefox (have to enter browser names 2 times as two tests run)
-
testng_api.xml - helps run api tests parellel
------------------------------
Page Factory (Page Object model design pattern) Test automation framework using Selenium Webdriver with Java, TestNG, Maven and Rest Assured
------------------------------ ------------------------------
------------------------------
------------------------------
The web tests require user inputs as browser names either 'chrome' or 'firefox'
------------------------------
As per official document- https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver
The chrome driver should be available at '/usr/bin/chromedriver' on the machine that executing the suite on chrome browser.
And same path needs to be set as 'PATH' system variable - hence no need to mention 'system.setProperty' for chrome
------------------------------
git clone https://github.com/nitint007/webAndAPITest
cd webAndAPITest
mvn clean test -Dsurefire.suiteXmlFiles=testng_web.xml
Go to 'webAndAPITest/testng_web.xml' Run as > 'TestNG Suite'
------------------------------
Go to 'webAndAPITest/test-output/' and open 'index.html'
------------------------------
Executable created at webAndAPITest/bin/parking_lot.bat
Go to '/webAndAPITest/testng_web.xml' Run as > 'TestNG Suite'
------------------------------
Considered the site is beta and has only one product to buy
------------------------------
------------------------------
------------------------------
The suite runs the tests parallel.
------------------------------
git clone https://github.com/nitint007/webAndAPITest
cd webAndAPITest
mvn clean test -Dsurefire.suiteXmlFiles=testng_api.xml
Go to 'webAndAPITest/testng_api.xml' Run as > 'TestNG Suite'
------------------------------
Go to 'webAndAPITest/test-output/' and open 'index.html'
------------------------------
Executable created at webAndAPITest/bin/parking_lot.bat
Go to 'webAndAPITest/testng_api.xml' Run as > 'TestNG Suite'
------------------------------
Two type of file are provided:
- For basic validation of library - 'file1' and 'file2'
- To check 1000+ request - 'longfile1' and 'longfile2' NOTE: Long files contains 1000 request are also verified.
------------------------------
Currently provided files with combination of URLs considering the problem statement to provide a two files only.
------------------------------