The project demonstrates use of Data driven automation framework. The framework implements one test case for showcase purpose.
Data driven approach is to used to run a single test case against multiple set of data.
These instructions will help you get started.
- Java
- Maven
- Browser driver [Project have a chrome driver embedded, chrome version: Version 76.0.3809.100 (64-bit)]
There are multiple approaches to implement data driven, and the project tries to demonstrate all the methods possible. Following are the types and testng file mapped:
- testng_WithoutExternalData.xml >> Where credentials are hard coded in the test.
- testng_HardCodedTestngParams.xml >> Where TestNg @Parameters are used. Here credentials are passed through testng xml file.
- testng_HardCodedDataProvider.xml >> Where @DataProvider is used. Here credentials are hard coded in the data provider itself.
- testng_ExcelDataProvider.xml >> Credentials are picked from external excel file. @DataProvider is used to supply data to the @Test.
- testng_CsvDataProvider.xml >> Credentials are picked from external CSV file. @DataProvider is used to supply data to the @Test. Here we can active or inactive any of the test data.
Uses Zero banking site for scenarios.
- Login to the portal successfully and verify landing page.
- Multiple credentials are used to implement the data driven project.
- Correct credentials are: username/password
Right click on any of the respective TestNG xml file and run as testng suite.
Default testng reports are generated under /test-output folder. Different reports:
- emailable-report.html
- index.html
Refer Guru99 TestNG reports for understanding testng reports.
Note: If no report folder is created, make sure to: Edit Config(Run suite) >> Listeners >> User Default Listeners.