Automation framework for testing of Guru99Bankdemo
This project aims to create an automated testing framework using the Selenium automation tool, Java as the programming language, TestNG as the testing framework, and following the Page Object Model (POM) design pattern. The target application for this project is the Guru99Bankdemo, which is a fictional online banking site for practicing and learning test automation.
The project uses the following tools, frameworks:
# | Tech/Tools | Name | Version |
---|---|---|---|
1 | Programming language | Java | 17.0.8 |
2 | Automation tool | Selenium webdriver | 14.4.1 |
3 | Testing framework | TestNG | 7.8.0 |
4 | Build Tool | Maven | 3.9.4 |
5 | IDE | Eclipse | 2023-09(4.29.0) |
6 | Reporting tool | Extent Reports | 5.1.1 |
Following is the folder structure for this project :
Following are the dependencies added to the pom.xml for this project :
# | Name | Version |
---|---|---|
1 | Selenium java | 14.4.1 |
3 | TestNG | 7.8.0 |
4 | Extent Reports | 5.1.1 |
Page Object Model (POM): Implement the POM design pattern. This pattern involves creating separate classes for each distinct page or section of the website under test.
Page Classes: Each page class encapsulates the web elements and methods required to interact with those elements on that specific page. This separation of concerns improves code maintainability.
Pages classes are saved under following path : "/guru99bankdemo/src/main/java/guru99bank/pages/"
Test Classes: Test classes that correspond to different test scenarios or functionalities are created. Tests classes are saved under following path : "/guru99bankdemo/src/test/java/guru99bank/testcases/"
Following are the test cases covered in the this Project:
- Login into application.
- Creating customer.
- Verifying created customer.
- Create new account.
- Verifying created account.
- Logging out of the application.
TestNG Annotations: TestNG annotations like @Test, @BeforeMethod, and @AfterMethod are used to organize test methods, setup, and teardown logic.
Page Object Usage: In your test methods, initialize and use the page objects to interact with web elements on the pages under test.
Test Data: Test data such as user id and password are saved in data.properties file, Other information like customer detials and account details are stored in data providers class.
Test Reporting: Implemented test reporting using third-party reporting frameworks - ExtentReports.
Reports are saved in the following location : "/guru99bankdemo/Reports/"
Extent Report opened automatically on the default browser after the execution is completed.
- Clone automation-framework-pom-selenium-java-testng-guru99bank project from Github
git clone https://github.com/itsamul/automation-framework-pom-selenium-java-testng-guru99bank.git
- Navigate to the cloned directory
cd automation-framework-pom-selenium-java-testng-guru99bank
- Compile maven dependencies
$ mvn compile
Guru99 Demo site credentials (Userid and password) are required to run test automation scripts. The userid and password will be available from the guru99 demo site homepage.
Replace the value for userid key and password key in the data.properties file.
Step 1. Navigate to the cloned directory
cd automation-framework-pom-selenium-java-testng-guru99bank
Step 2: Open command prompt and run the following command
mvn clean test
Shown below is the execution screenshot triggered by the above command :
Step 3: Extent Report open automatically on the default browser after the execution is completed.