# Keyword Driven Testing Framework with Selenium
This project demonstrates a Keyword Driven Testing (KDT) framework implemented using Selenium WebDriver in Java. The framework allows for easy creation and execution of automated test cases using a set of keywords defined in CSV files.
- Keyword-driven approach for writing test cases.
- Test cases defined in CSV files for easy maintenance and readability.
- Support for parallel execution of test cases.
- Integration with TestNG for test execution and reporting.
- Flexible and extensible architecture.
src/main/java/
: Contains the source code for the Keyword Driven Testing framework.src/test/java/
: Contains the test scripts written using the framework.src/test/resources/csvs/
: Contains the CSV files defining the test cases in the form of keywords.testng.xml
: TestNG configuration file for executing the tests.
- Clone the repository to your local machine.
- Import the project into your preferred Java IDE (e.g., Eclipse, IntelliJ IDEA).
- Ensure that you have the necessary dependencies configured (e.g., Selenium WebDriver, TestNG).
- Define your test cases in CSV files located in the
src/test/resources/csvs/
directory.
- You can run the tests using the TestNG XML configuration file (
testng.xml
). - Execute the
testng.xml
file using your IDE or the TestNG command-line interface. - Ensure that the WebDriver instance is properly initialized and managed during test execution.
- Parallel run through thread-count and parallel tags in testng.xml
- You can see the full csv file formatted data in the console output.
- TestNG generates detailed HTML reports after test execution.
- The reports provide information about test results, including pass/fail status and error messages.
- Integrated Extent and Allure reports as well, including pass/fail status, error messages and screenshot for failure tests.
-
Allure Report Allure is a flexible lightweight test report tool that not only shows a very concise representation of what have been tested in a neat web report form, but allows everyone participating in the development process to extract maximum of useful information from everyday execution of tests.
-
To generate Allure reports, follow these steps:
-
Install Allure command-line tool using the instructions provided in the Allure documentation.
Execute your tests with Allure listeners attached.
After the test execution is complete, generate the Allure report using the command: **allure generate --clean **
- View the generated report by running: **allure open **
-
Extent Report ExtentReports is an open-source reporting library for Java designed for the creation of beautiful, interactive, and detailed HTML reports.
- After the test execution is complete, the Extent report will be generated automatically.
- View the generated Extent report in the /reports directory.
Contributions to improve the framework or add new features are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.
NA