How oktaliem/pengujianmembandingkangambar works
Project type and purpose
• This is an automated testing framework that combines functional (Selenium/Appium) and visual regression testing using Cucumber (BDD), Maven, AShot, Visual Regression Tracker, Micoo, and Allure reporting.
• Its goal is to let QA engineers run end-to-end functional tests and at the same time run visual comparisons of the UI across multiple sites (Blibli, Bukalapak, Yahoo Finance, a demo Selenium site).
File structure
• Top-level:
• pom.xml (Maven build & dependency management)
• micoo (Micoo library integration)
• README.md, LICENSE, .gitignore
• src/test/java/com/oktaliem:
• features/… .feature files (Cucumber Gherkin scenarios)
• stepdefs/… Step definition classes mapping Gherkin steps to code
• page/… Page Object Model classes for each target site
• page/webactions/… low-level action and assertion wrappers (JS executor, waits, mouse/keyboard, general actions)
• utils/… constants and path utilities
• src/test/resources:
• baseimages (reference screenshots for visual tests)
• log4j.properties (logging configuration)
Key insights from README
• Integration with three visual-testing libraries: AShot (+Allure), Visual Regression Tracker, Micoo
• Maven commands to drive tests, support for Selenium Grid via system properties
• Feature files are grouped by library/approach:
• AShot + Allure: SeleniumWebsiteVisualTest.feature
• VRT: BlibliVisualTest.feature, BukalapakVisualTest.feature
• Micoo: YahooFinanceVisualTest.feature
Main components
a. Test Runner Layer
• Maven Surefire/Failsafe plugins
• Cucumber JUnit runner
• Command-line entry points (mvn clean test with flags)
b. BDD Layer
• Feature files (.feature)
• Step Definitions (com.oktaliem.stepdefs)
c. Test Logic Layer
• Page Objects (com.oktaliem.page)
• Webactions (com.oktaliem.page.webactions)
d. Libraries & Tools
• Selenium/WebDriver (local or Grid)
• Appium (if mobile)
• AShot (screenshot capture)
• Visual Regression Tracker (server API)
• Micoo
• Allure Cucumber JVM plugin (report generation)
e. External Services
• Selenium Grid Hub (optional, via –Dbrowser=grid –Dgrid_url)
• VRT server URL
f. Resources & Artifacts
• baseimages (baseline screenshots)
• allure-results (test report files)
• logs (log4j output)
Relationships and data flow
1. Maven invokes the Cucumber runner
2. The runner parses feature files → invokes matching step definition methods
3. Step definitions call into Page Objects and Webactions
4. Page Objects wrap WebDriver/Appium calls to open browsers and navigate to target URLs
5. Webactions perform clicks, keys, waits, JS, assertions
6. When a visual assertion is needed:
a. AShot or Micoo captures screenshots
b. Visual Regression Tracker client posts images to the VRT server
c. Comparison against baseline images (src/test/resources/baseimages)
d. Result (pass/fail) returned to test code
7. Allure plugin collects test results, screenshots, logs, and assembles the final report
Architectural patterns/design principles
• Layered architecture:
• Entry → BDD layer → Test logic → Infrastructure (WebDriver) → External services
• Page Object Model for UI abstraction
• Separation of concerns: feature files vs. step definitions vs. page & action code
• Modular integration of multiple visual-testing approaches
• Configurable via Maven properties and log4j
Final advice
• How the framework plugs in different visual-testing libraries side-by-side.
• Configuration inputs (Maven flags, log4j) and where they influence runtime.
• This will give stakeholders a clear, accurate view of how tests flow through BDD scenarios into real browser executions, into visual comparisons, and into reporting.