This project demonstrates a Behavior-Driven Development (BDD) approach using Cucumber in a Java environment. It integrates UI testing with Selenium, database interactions via MySQL, and API testing using the RestAssured library. The project follows the Page Object Model (POM) design pattern to enhance maintainability and readability.
- Automated UI testing with Selenium WebDriver
- Database validation using MySQL
- API testing with RestAssured
- BDD framework using Cucumber for clear test scenarios
- Page Object Model for better organization of UI tests
- Java: The primary programming language for the project.
- Selenium: For automating web browser interaction.
- Cucumber: For writing BDD-style test scenarios and test cases.
- MySQL: For database connectivity and validations.
- RestAssured: For API testing.
- JUnit: For running tests and assertions.
/src
/main
/java
/com
/demo
/pages # Page Object Model classes
/runners
/steps # Step definitions for Cucumber
/utility # Utility classes
/resources
/features # Cucumber feature files
-
Clone the repository: ´´´javascript git clone https://github.com/hiltas73/DEMO_UI_DB_API cd your-repo-name ´´´
-
Install dependencies: Make sure you have Maven installed, then run:
mvn install
-
Configure MySQL Connection: Update the MySQL connection settings in the
config.properties
file located in thesrc/test/resources
directory. -
Set up WebDriver: Download the appropriate WebDriver for your browser and ensure it is in your system's PATH.
To run the tests, use the following command:
mvn test
You can also run specific feature files by specifying their paths.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
Contributions are welcome! Please follow these steps:
Fork the repository.
Create a new branch: git checkout -b feature/YourFeature
Make your changes and commit them: git commit -m "Add some feature"
Push to the branch: git push origin feature/YourFeature
Open a pull request.
hiltas73 - hiltas73