This is a comprehensive test automation project designed to test the core e-commerce functionality of the Ebebek website (www.ebebek.com.tr). The project implements automated testing for the complete user journey from product search to checkout, ensuring the reliability and quality of the online shopping experience.
The automation suite covers the following critical e-commerce user flow:
- Product Search - Automated search functionality for baby products (specifically "kaşık maması" - baby spoon food)
- Product Selection - Verification of product listing and selection capabilities
- Product Details - Validation of product detail page functionality
- Add to Cart - Testing the add-to-cart functionality with product verification
- Cart Management - Verification of cart contents and navigation
- Checkout Process - Testing the transition to membership/login page for order completion
- Programming Language: Java 19
- Testing Framework: JUnit 5 (Jupiter)
- Web Automation: Selenium WebDriver 4.6.0
- Driver Management: WebDriverManager 5.3.1
- Build Tool: Maven
- Logging: Log4j 1.2.17
- Browser: Chrome (ChromeDriver)
qa_case/
├── src/
│ ├── main/java/
│ │ ├── BasePage.java # Base page object with common web element operations
│ │ ├── HomePage.java # Home page object model
│ │ ├── SearchBox.java # Search functionality component
│ │ ├── ProductsPage.java # Product listing page object
│ │ ├── ProductDetailPage.java # Individual product page object
│ │ ├── CartPage.java # Shopping cart page object
│ │ ├── MemberShipPage.java # Login/membership page object
│ │ └── com/ebebek/qa_case/
│ │ └── Qa_case.java # Main application class
│ └── test/java/
│ ├── BaseTest.java # Base test configuration and setup
│ └── Test_Add_Product_To_Cart.java # Main test suite
├── pom.xml # Maven configuration
└── chromedriver.exe # Chrome WebDriver executable
- Page Object Model (POM): Each web page is represented as a separate class with its own locators and methods
- Base Page Pattern: Common web element operations are centralized in
BasePage.java - Test Base Pattern: Common test setup and teardown logic in
BaseTest.java - Component Pattern: Reusable components like
SearchBoxare separated for better maintainability
- Implicit wait configuration (10 seconds)
- Custom element finding methods with proper exception handling
- Thread sleep for dynamic content loading
- Page navigation verification
- Product consistency validation
- Cart functionality verification
- User flow completion checks
- Detailed logging for each test step
- Turkish language logging for better local team understanding
- Log4j integration for structured logging
- Automatic ChromeDriver setup using WebDriverManager
- Window maximization for consistent testing
- Proper browser cleanup after test execution
- Java Development Kit (JDK) 19 or higher
- Maven 3.6+ for dependency management
- Google Chrome Browser (latest version recommended)
- Internet connection for accessing the Ebebek website
-
Clone the repository:
git clone <repository-url> cd ebebek_qa_case
-
Navigate to the project directory:
cd qa_case -
Install dependencies:
mvn clean install
-
Verify Java version:
java -version
# Run all tests
mvn test
# Run with verbose output
mvn test -X
# Run specific test class
mvn test -Dtest=Test_Add_Product_To_Cart- Import the project as a Maven project in your IDE
- Navigate to
src/test/java/Test_Add_Product_To_Cart.java - Right-click and select "Run Test"
The test suite executes in the following order:
-
Setup (
@BeforeAll)- Initialize ChromeDriver
- Navigate to Ebebek homepage
- Maximize browser window
- Set implicit wait timeout
-
Test Execution (Ordered sequence)
searchProduct()- Search for "kaşık maması"selectProduct()- Select a product from resultsaddProductToCart()- Add selected product to cartgoToCart()- Navigate to shopping cartcompleteShopping()- Proceed to checkout
-
Cleanup (
@AfterAll)- Close browser and cleanup resources
Key dependencies and their purposes:
- Selenium WebDriver: Web browser automation
- JUnit Jupiter: Modern testing framework with annotations
- WebDriverManager: Automatic driver management
- Log4j: Logging framework for test execution tracking
- Test Instance Lifecycle:
PER_CLASSfor shared state across test methods - Test Method Ordering:
OrderAnnotationfor sequential test execution - Implicit Wait: 10 seconds for element loading
- Target URL: https://www.ebebek.com.tr
-
ChromeDriver Issues:
- Ensure Chrome browser is updated
- WebDriverManager should handle driver compatibility automatically
-
Element Not Found:
- Check if website structure has changed
- Verify CSS selectors and IDs in page objects
- Increase implicit wait time if needed
-
Test Failures:
- Check internet connectivity
- Verify website availability
- Review logs for detailed error information
Enable verbose logging by running:
mvn test -X -Dlog4j.debug- Follow the existing Page Object Model pattern
- Add appropriate assertions for new functionality
- Include logging for new test steps
- Update this README for any new features
- Ensure all tests pass before submitting changes
- Cross-browser testing (Firefox, Safari, Edge)
- Parallel test execution for faster feedback
- Data-driven testing with external test data
- API testing integration for comprehensive coverage
- CI/CD pipeline integration (Jenkins, GitHub Actions)
- Test reporting with Allure or ExtentReports
- Mobile testing with Appium integration
This project is created for educational and testing purposes.
For questions or issues, please contact the development team or create an issue in the project repository.