How qaf-tm/qaf works
Project Type and Purpose
• This is a multi-module Java-based automation framework designed for functional testing of web, mobile web, mobile native applications, as well as REST web services.
• The framework supports various test authoring paradigms (BDD, keyword driven, code-driven) and integrates with popular test management, continuous integration, and mobile device cloud systems.
• It is built around key testing technologies like TestNG, Selenium/Webdriver, Appium, and newer integrations such as Playwright.
Analyzing the File Structure
• The project is organized into several top-level modules – for example, “qaf-core”, “qaf-playwright”, “qaf-selenium”, “qaf-support-ws”, “qaf-support”, “qaf-testng”, “qaf-tools”, and “qaf-ws”. This clearly reflects a modular design where each module focuses on a specific aspect of test automation.
• Look out for shared configuration files (pom.xml, ivy.xml, build.xml), CI/CD configurations (.travis.yml, GitHub workflows) and common libraries in the “lib” directory.
• Within the modules, the “src/main/java” hierarchies exhibit further separation of concerns: core utilities, data management, UI drivers, reporting, step definitions, and integrations with external systems (e.g., REST, OAuth support).
Main Components
a. Core Engine (QAF-Core):
b. Test Execution and Driver Modules:
• QAF-TestNG: Represent this as the bridge between the framework and the actual test execution, handling TestNG integration, scenario management (BDD, Gherkin, keyword) and report generation.
• QAF-Selenium and QAF-Playwright: Show these modules as providing the UI automation drivers. They abstract Selenium/WebDriver and Playwright-based testing respectively, with components such as the driver factories, element locators, and command processors.
• QAF-Support and QAF-Support-WS: These components provide specialized steps and support libraries for web (and mobile web), mobile native and REST/web service testing. Illustrate their interactions with the core engine and test execution modules.
c. Additional Utilities and Tools:
• QAF-Tools: Indicate tools such as repository importers or property editors which enhance the extensibility and configuration of the framework.
• QAF-WS: Represent REST client utilities and web-service testing support.
d. External Services and Integrations:
• External integrations such as CI/CD (Jenkins, Bamboo, Travis CI as indicated by workflows and config files) and test management systems (QMetry, Rally, HP ALM, etc.).
• Optionally, highlight external device cloud services (Perfecto, Sauce Labs) and mobile device integration as interacting with the UI driver components.
Relationships and Interactions
• How configuration and data flow from utility components to the higher-level test steps.
• Integration points where support modules “qaf-support*” are plugged in for domain-specific actions.
• CI/CD interactions (using Maven builds, Travis CI, GitHub workflows) showing that the build process triggers test suite execution which then uses the QAF architecture to run tests and generate reports.
Architectural Patterns and Design Principles
• Abstraction layers: the framework abstracts driver implementations (Selenium, Playwright) from test case definitions.
• Use of design patterns such as Factory (e.g., DriverFactory in qaf-core, QAFWebDriverCommandProcessor), Listener/Observer (test event listeners in TestNG integration and logging/reporting), and perhaps a modular plugin design (with support libraries easily integrated).
• That extensibility and reusability are key principles—many modules are built to be interchanged or extended without impacting the core functionalities.