You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The framework uses a **layered isolation model** combining shared singletons for configuration and reporting with thread-local storage for driver and page object isolation. This enables safe parallel test execution without resource contention.
| **Template Method** | `BasePage` defines common actions | DRY, consistent element interactions |
525
445
| **Strategy Pattern** | Element-based assertions with fallbacks | Reliable mobile element detection |
526
446
527
-
## Architectural Traceability & Rationale ##
528
447
529
-
Why This Design?
530
-
Our framework is architected for scalability, maintainability, and parallel execution. Key design choices include:
531
-
532
-
Layered Traceability:
533
-
Each test scenario flows from .feature files (business intent), through step definitions (glue), into screen/page objects (UI abstraction), and down to base classes and utilities (engine). This clear separation ensures traceability from business requirements to code.
534
-
535
-
OOP Principles:
536
-
537
-
Abstract BasePage: Enforces a contract for all screens, sharing common actions while preventing direct instantiation.
538
-
Protected Methods: Restrict low-level actions to subclasses, encapsulating driver logic and reducing accidental misuse.
539
-
Final Utility Classes: (e.g., WdioLocators) Prevent inheritance and instantiation, ensuring a single source of truth for constants and locators.
540
-
Composition Over Inheritance:
541
-
Utility classes (e.g., ElementActions, WaitUtils) are injected into page objects, promoting loose coupling and easier testing.
542
-
543
-
Thread Safety:
544
-
DriverManager uses ThreadLocal to isolate driver instances, enabling safe parallel test execution and maximizing resource utilization.
545
-
546
-
Design Patterns:
547
-
548
-
Singleton: For configuration management, ensuring consistent settings.
549
-
Factory: For driver creation, supporting multiple platforms.
550
-
Page Object Manager: Centralizes and reuses page objects, reducing duplication.
551
-
Architectural Intelligence
552
-
This design:
553
-
554
-
Supports parallelism (via ThreadLocal drivers).
555
-
Enforces encapsulation (via access modifiers and abstract classes).
556
-
Promotes reusability and maintainability (via composition and design patterns).
557
-
Enables clear traceability from business logic to engine code, making debugging and onboarding easier.
558
448
559
449
560
450
## 🚀 Quick Start
561
451
562
452
### Prerequisites
563
453
- Java 21+
564
454
- Maven 3.8+
565
-
- Appium Server 2.x (`npm install -g appium`)
566
-
- Android SDK (for Android testing)
567
-
- Xcode (for iOS testing on macOS)
455
+
- BrowserStack account with active credentials
568
456
569
457
### Installation
570
458
@@ -575,15 +463,11 @@ cd MobileAutomation_BDD_Framework
575
463
576
464
# Install dependencies
577
465
mvn clean install -DskipTests
578
-
579
-
# Install Appium drivers
580
-
appium driver install uiautomator2 # Android
581
-
appium driver install xcuitest # iOS
582
466
```
583
467
584
468
### Running Tests
585
469
586
-
All tests run on BrowserStack using the SDK agent. See the BrowserStack section below for detailed instructions.
470
+
All tests run on BrowserStack cloud infrastructure using the SDK agent. See the **BrowserStack (SDK-Only)** section for detailed instructions.
0 commit comments