This is a complete project where a DailyFinance site is automated by writing test suites using selenium-webdriver and TestNg as testing framework.
The following key modules/pages are automated:
- Register User implementing different Scenarios
- Log in as admin (pass admin credentials from the terminal) and check if the last registered user is displayed on the admin dashboard.
- Log in with the last registered user and update their profile image.
- Add a cost/expenditure from a CSV file. Create a CSV file with 5 rows, This test will loop 5 times, as there are 5 data sets in the CSV.
- Print the total cost and assert it against your expected total sum of the amounts.
- Search for an item by name from the list and assert that the total cost matches the item's price.
- Create Regression Suite and Smoke Suite, ANd run them individually.
For failed test cases it will take a screenshot aswell at the point of failure.
- Tool: Selenium Webdriver
- IDE: Intellij
- Build tool: Gradle
- Language: Java
- Test_Runner: TestNG
- Need to install jdk 11, gradle and allure
- Configure Environment variable for jdk 11, gradle and allure
- Clone this project and unzip it
- Open the project folder
- Double click on "build.gradle" and open it through IntellIJ IDEA
- Let the project build successfully
- Click on "Terminal" and run the automation scripts
- Selenium will open the browser and start automating for smokeSuites.
./gradlew test -PsuiteName="smokeSuites.xml"
- Selenium will open the browser and start automating for regressionSuites.
./gradlew test -PsuiteName="regressionSuites.xml"
- After automation to view allure report , give the following commands:
allure generate allure-results --clean -o allure-report
allure serve allure-results