How swapnilgirishpawar/ios-scheduling-automation-fork works
Project Type and Purpose
• This is a test-automation framework (an open-source tool for iOS app testing)
• Purpose: Provide reusable, configurable, end-to-end mobile UI and API tests using Appium and TestNG
Main Architectural Layers and Components
a. Test Orchestration
• TestNG Runner
• XML Suite Definitions (under XMLRunners/)
• Maven (pom.xml)
b. Core Framework
• BaseClass Layer
– Capabilities.java (Appium capabilities)
– Config.java (environment & credentials)
– Hooks.java (TestNG @Before/@After initializations)
• Page Object Layer (src/test/java/Pages/)
– Calendar, Contacts, Login, Services, Settings sub-packages
– Centralizes locators and page actions
• API Manager Layer (src/test/java/API/)
– Encapsulates direct API calls (AccountManager, AppointmentServiceManager, etc.)
• Utilities (src/test/java/Utils/)
– CommonFunctions, APIUtils (TokenFetcher, ApiService), SheetsQuickstart, etc.
c. Test Suites
• Functional Suites (src/test/java/TestSuite/)
• Regression Suites (src/test/java/RegressionSuite/)
• OfflineSyncTests, Regressions, Services, Settings, etc.
d. Resources & Configuration
• JSON Test Data (src/test/resources/JSONs/)
• log4j2.xml (logging configuration)
e. Reporting & Artifacts
• Extent Reports (HTML outputs, screenshots)
• emailable-report.html
f. External Dependencies
• Appium Server
• iOS Simulators / Real Devices (via Xcode)
• CI/CD Server (e.g., Jenkins)
• Version Control (Git)
Relationships and Data Flow
1. Developer or CI server invokes Maven’s mvn test
2. Maven loads pom.xml, resolves dependencies, runs TestNG
3. TestNG reads XML suite files (XMLRunners/*.xml) → schedules test classes
4. Hooks initialize Appium driver (Capabilities + Config) against Appium Server
5. Test methods invoke Page Objects and/or API Managers and Helpers from Utils
6. Page Objects perform UI interactions on iOS Simulator/Device
7. API Managers make REST calls to backend services as needed
8. Utilities handle auxiliary tasks (data fetching, token management, screenshots)
9. Hooks capture test results, logs, screenshots, generate Extent Reports
10. Reports and logs are archived and surfaced via CI
Architectural Patterns and Principles
• Layered (Separation of Concerns: Test Orchestration → Base Classes → Page Objects/API → Utils)
• Page Object Model (POM) for UI encapsulation
• Keyword/Modular reusability across projects
• Configuration-driven environments (Local, RemoteBranch, Master)
• Data-driven testing via JSON resources
Essential Elements to Capture
• TestNG Runner & XML suite definitions
• Maven build & dependency graph
• BaseClass initialization (Capabilities, Config, Hooks)
• Page Object & API Manager layers
• Utils layer (TokenFetcher, CommonFunctions, SheetsQuickstart)
• Resource files (JSONs, log4j2.xml)
• External systems (Appium Server, iOS Device, CI/CD)
• Reporting output path and artifacts