How gadilapraveenkumar/userbasedautomation works
Main Components
• Test Runner & Execution: The entry point of testing is driven by TestNG (as indicated by testng.xml and the presence of a dedicated TestRunner package). This component orchestrates the test execution.
• Driver Management: The DriverFactory (located under src/test/java/DriverFactory) is responsible for creating and managing web driver instances. Notably, the presence of msedgedriver.exe in the lib directory confirms that browser automation (likely using Selenium) is a core part of the framework.
• Hooks and Test Lifecycle: MasterHook under the Hooks directory manages pre- and post-test actions such as test setup and teardown.
• Step Definitions: Found in src/test/java/stepdefinitions, these bridge the test scenarios (possibly defined in Cucumber feature files under src/test/resources/features) to the underlying automation code.
• Page Objects: The project applies the Page Object Model pattern (evidenced by the pageObjects directory) to encapsulate UI interactions. Examples include LoginPage, LHNMenuPage, and EachPageValidation.
• Utilities and Constants: Utility classes (e.g., Util, ImageBase64Encoder, SummaryReport) and constants are used to support common operations and reporting.
• Configuration: The src/test/resources/properties directory contains configuration files (env, capabilities, prod, qa) that control environment-specific settings.
• Reporting: The Reports directory shows that HTML reports are generated to provide execution feedback.
Out the Relationships and Data Flow
• Configuration files are referenced by multiple components (DriverFactory, Hooks, etc.) to set up the environment and capabilities.
Architectural Patterns and Design Principles
• Modular Structure: The clear separation between test execution, UI interaction (Page Objects), and utility functions ensures maintainability.
• Page Object Model: The division into cohesive page-specific classes encapsulates UI logic.
• Reusability and Extensibility: The inclusion of step definitions and hook mechanisms makes it easy to extend the framework for different user scenarios.
• Configuration-Driven Testing: Externalizing environment parameters in property files supports flexibility across various test environments.
Incorporate Relevant Technologies/Frameworks
• TestNG: For driving test execution (and managing lifecycle through testng.xml).
• Selenium WebDriver: Implicitly used for browser automation with msedgedriver.
• Maven: Indicated by the presence of pom.xml for build and dependency management.
• Cucumber (or similar behavior-driven tools): Suggested by the use of .feature files in the resources directory.
• HTML Reporting: Custom reporting utilities generating user summary reports.