How asingh403/api-pom-nov21 works
Main Components
• Test Execution Engine – Represented by TestNG’s test suite (testng.xml) that triggers the execution of the test cases.
• API Test Modules – The core API test classes (such as GetImgurAPITest) that interact with the REST client.
• REST Client – The module handling API calls (e.g., RestClient.java) that manages multipart requests including file/image uploads.
• Utility Modules – Support components like:
• Excel Utility for reading/populating test data.
• Token Utility for handling authentication tokens.
• Reporting Components – The listeners and reporting modules:
• Extent Report Listener for generating HTML reports.
• Allure Reporter integration (with JSON outputs and a separate results directory).
• CI/CD Pipeline – Jenkins integration which likely pulls the framework, executes test suites, and triggers reporting.
• Build/Report Artifacts – The build directory for HTML reports (Extent), and the allure-results directory for Allure reports.
Relationships and Interactions
• The Test Execution Engine should be connected to the API Test Modules, which in turn use the REST Client to interact with external APIs (such as the Imgur API).
• Link the Utility Modules (Excel Utility and Token Utility) to the test modules – showing that they supply necessary data for the tests (for example, token management and test data input).
Architectural Patterns & Design Principles
• Use of the Page Object Model style even though it is customized for API testing, which separates concerns (test logic versus utility functions).
• Modular separation – each functionality (REST operations, token handling, Excel utilities, and reporting) is isolated and reusable.
• To note that the CI/CD component integrates at the execution level to ensure continuous delivery and test reporting.
Relevant Technologies & Frameworks
• TestNG is used for driving test executions.
• REST client tools/libraries for API interactions.
• Utility libraries for handling Excel documents and token generation.
• Reporting tools: Extent Reports and Allure for HTML and JSON-based report generation.
• Jenkins for CI/CD pipeline orchestration.
a. CI/CD Pipeline:
b. Build the Testing Core:
• “REST Client Module” (for making HTTP calls including file uploads).
• “Utility Modules” (split this into “Token Utility” and “Excel Utility”).
c. Reporting Flow:
• Resulting output directed from these listeners to their respective artifact directories (“build folder” for Extent reports and “allure-results” for Allure).
d. External Interactions: