@@ -21,49 +21,26 @@ Framework Overview:
2121- Language: Java 21
2222- Build Tool: Maven
2323- Test Framework: TestNG + Cucumber BDD
24- - Mobile Automation: Appium (Android & iOS)
24+ - Mobile Automation: Appium (Android & iOS) on BrowserStack cloud (SDK-managed capabilities)
2525- Reporting: Extent Reports + Cucumber HTML Reports
2626- Design Patterns: Page Object Model, Factory Pattern, Singleton, ThreadLocal
27+ - Config: BrowserStack YAML (`browserstack-*.yml`) with `frameworkOptions` for waits; no local properties
2728- CI/CD: GitHub Actions, Azure DevOps, Docker
2829
29- Project Structure (Maven Standard Layout ):
30+ Project Structure (BrowserStack-only ):
3031src/
31- ├── main/java/ # Framework Library
32+ ├── main/java/
3233│ └── com/automation/framework/
33- │ ├── core/
34- │ │ ├── ConfigManager.java # Multi-environment configuration
35- │ │ ├── DriverFactory.java # Platform-specific driver creation
36- │ │ └── DriverManager.java # Thread-safe driver management
37- │ ├── pages/
38- │ │ ├── BasePage.java # Base class for all page objects
39- │ │ ├── locators/
40- │ │ │ └── WdioLocators.java # Centralized locator constants
41- │ │ └── screens/
42- │ │ └── LoginScreen.java # Page object implementation
43- │ └── reports/
44- │ └── ExtentReportManager.java # Extent Reports management
45- │
46- ├── main/resources/
47- │ ├── config.properties # Base configuration
48- │ ├── config-local.properties # Local environment overrides
49- │ ├── config-staging.properties # Staging environment
50- │ ├── config-prod.properties # Production environment
51- │ └── logback.xml # Logging configuration
52- │
53- ├── test/java/ # Test Code
54- │ ├── listeners/
55- │ │ ├── ExtentReportListener.java # Report lifecycle
56- │ │ ├── RetryAnalyzer.java # Retry failed tests
57- │ │ └── RetryTransformer.java # Auto-apply retry
58- │ ├── runner/
59- │ │ └── TestNgRunner.java # Cucumber-TestNG runner
60- │ └── stepdefinitions/
61- │ ├── Hooks.java # Cucumber hooks
62- │ └── WdioLoginSteps.java # Step definitions
63- │
64- └── test/resources/
65- └── features/
66- └── wdioLogin.feature # BDD feature files
34+ │ ├── core/ (ConfigManager – YAML loader, DriverFactory – BrowserStack SDK, DriverManager – ThreadLocal, FrameworkConstants – minimal)
35+ │ ├── pages/ (BasePage, PageObjectManager, locators, screens)
36+ │ └── reports/ExtentReportManager
37+ ├── main/resources/ (extent-config.xml, logback.xml)
38+ ├── test/java/ (listeners, runner, stepdefinitions)
39+ └── test/resources/features/
40+
41+ TestNG Suite: `testngSuite.xml` (was testngParallel.xml)
42+
43+ Root YAML: browserstack-android*.yml, browserstack-ios*.yml with `frameworkOptions` for waits.
6744
6845Teaching Objectives - Cover these topics in order:
6946
@@ -172,8 +149,8 @@ Driver Layer → "Kitchen Equipment" (actual tools)
172149
173150**3. SMART DESIGN #1: Factory Pattern (DriverFactory)**
174151- Analogy: A car factory that builds different car models (Android/iOS) from the same blueprint
175- - Why it's smart: One method createDriver() handles both platforms
176- - The atomic port counter trick for parallel execution
152+ - Why it's smart: One method createDriver() handles both platforms (BrowserStack-only)
153+ - BrowserStack SDK injects capabilities from YAML; code stays minimal
177154
178155**4. SMART DESIGN #2: Singleton Pattern (ConfigManager)**
179156- Analogy: A library with ONE master catalog that everyone shares
@@ -183,7 +160,7 @@ Driver Layer → "Kitchen Equipment" (actual tools)
183160**5. SMART DESIGN #3: Thread-Local Pattern (DriverManager)**
184161- Analogy: A gym where each person gets their own locker
185162- Why it's smart: Parallel tests don't fight over the same driver
186- - How ThreadLocal gives each test its own isolated driver
163+ - ThreadLocal gives each test its own isolated driver; cleanup in Hooks
187164
188165**6. SMART DESIGN #4: Page Object Model**
189166- Analogy: A recipe book - change recipe once, all dishes update
@@ -211,8 +188,8 @@ Feature → Runner → Hooks(@Before) → StepDef → PageObject → Driver →
211188**9. WHY THIS IS PRODUCTION-READY**
212189Explain these enterprise features simply:
213190- Retry mechanism for flaky mobile tests
214- - Multi-environment config (local/staging/prod)
215- - Parallel execution support
191+ - BrowserStack YAML config with SDK-managed capabilities; waits via `frameworkOptions`
192+ - Parallel execution support (ThreadLocal drivers)
216193- Detailed HTML reports with screenshots
217194- CI/CD ready (GitHub Actions, Azure DevOps)
218195
0 commit comments