Data Driven framework is focused on separating the test scripts logic and the test data from each other. This allows us to create test automation scripts by passing different sets of test data. The test data set is kept in the external files or resources such as MS Excel Sheets, MS Access Tables, SQL Database, XML files etc., The test scripts connect to the external resources to get the test data. This framework significantly reduces the number of test scripts compared to a modular based framework when we need to test for multiple sets of data for same functionality.
For Demo purpose all the test cases are created for automationpractice.com site.
- It generates Extent & Allure reports with all the step details.
- It support parallel execution of test cases.
- It generates test execution log file.
- Test execution can be triggered form command line.
- Easy integration to CI/CD pipeline.
- Framework uses Page Object Design Pattern, hence there is clean separation between test code and page specific code such as locators and layout.
- Framework has the capability to re-run the failed test cases.
- Video recording of test execution can be enabled in local test runs
- Java should be installed and configured.
- Maven should be installed and configured.
- Download the files from Git repository either as zip file OR using Git.
- Download and install Allure commandline application, suitable for your environment.
Open the command prompt and navigate to the folder in which pom.xml file is present. Run the below Maven command.
mvn clean test -Dvideo.enabled=false
This will run 2 test cases in parallel (default thread count is 2) and video recording in disabled mode. Once the execution completes report will be generated in below folder structure.
Extent Report: /test-output/report/test-report.html
Allure Report: To generate the report we need to go through below steps.
To generate the report from existing Allure results use below command.
allure generate allure-results -c -o allure-report
After the report is generated, open it in default system browser using below command.
allure open allure-report
Video Recoding:
To execute the test cases with video recording feature run below command.
mvn clean test -Dvideo.enabled=true -Dparallel.thread=1
- Video recording works well only on local and non parallel execution mode as the video recorder captures the screen.
- As screen action is been captured by video recorder don't perform any action on screen while test is executing.