How archimedesaj/fantasygold-interview-challenge works
Project type and purpose
• This is a Java-based automated testing framework for an e-commerce website.
• Key purpose: verify site functionality via Selenium WebDriver, organize tests with TestNG, drive data from Excel (Apache POI), and produce HTML reports (ExtentReports).
File structure
• Root:
• pom.xml → Maven build and dependency management
• testng.xml → TestNG suite definition
• src/main/java/org/example/Main.java
• A simple entry point (optional for CLI triggers)
• src/main/resources/TestData/Credentials.xls
• Excel file serving as data source
• src/test/java
• Page_Objects/… → Page Object Model classes for each page (LoginPage, RegisterPage, ShopPage)
• DataUtils/ReadExcelFile.java → Utility to read Excel data (Apache POI)
• ExtentReportSetUp/ScreenshotListener.java → Reporting hooks (captures screenshots on failure)
• Test classes (LoginTests, RegisterTests, CheckoutTests, ProductFilterTests)
Extract insights from the README
• Java + Maven for build
• Selenium WebDriver for browser automation
• TestNG for test orchestration and reporting
• Apache POI for data-driven testing
a. Main components
• Test Runner (TestNG)
• Test Cases
• Page Objects
• WebDriver (browser driver)
• Data Layer (Excel files + ReadExcelFile)
• Reporting Layer (ExtentReports + ScreenshotListener)
• External System Under Test (e-commerce site at https://moreplexghana.com)
b. Relationships / Data flow
1. TestNG suite triggers Test Cases
2. Each Test Case invokes Page Object methods
3. Page Objects call WebDriver to perform browser actions against the live site
4. DataUtils reads inputs from the Excel file and feeds Tests / Page Objects
5. ScreenshotListener monitors test execution, captures failures
6. ExtentReports assembles logs, screenshots, and test outcomes into HTML report
c. Architectural patterns & principles
• Layered design:
• Test Layer (TestNG test classes)
• Page Layer (POM classes)
• Utility Layer (data readers, listener)
• Resource Layer (Excel files)
• Data-driven testing via Apache POI
• Separation of concerns: page locators/actions separated from test logic
d. Key technologies
• Selenium WebDriver
• TestNG
• Apache POI
• Maven
• ExtentReports