How saucelabs/visual-sdks works
High-Level Architecture Components
a. Core SDKs Layer
• Five main SDK implementations (.NET, Java, JavaScript/TypeScript, Python, Espresso)
• Each SDK should be represented as a major component
b. Testing Framework Integration Layer
• Cypress, Nightwatch, Playwright, WebDriverIO, Storybook (JavaScript)
• JUnit/TestNG (Java)
• Robot Framework (Python)
• Espresso (Android)
c. Common Infrastructure Layer
• GraphQL API Client
• Authentication Handling
• Visual Testing Core Features
Component Relationships
a. SDK Implementation Pattern (for each SDK):
• Testing Framework Integration → SDK Core → GraphQL API → Sauce Labs Visual Service
b. Shared Components:
• Common GraphQL operations shared across SDKs
• Shared visual testing features (snapshots, diffs, builds)
Detailed Component Breakdown
For each SDK, include these elements:
SDK Core
• API Client
• GraphQL Operations
• Authentication
• Visual Testing Features
• Build Management
• Snapshot Handling
• Diff Analysis
• Framework-Specific Adapters
Implementation Details
Key architectural patterns:
• GraphQL client implementation
• Build management system
• Visual comparison workflow
• Framework-specific adapters
Data Flow
Following flows:
Test Framework → SDK → Visual API → Results Processing → Test Reports
Integration Points
Highlight:
• CI/CD integration (.github/workflows)
• Cross-language compatibility
• Framework-specific adapters
Version management and release workflow
Key Elements to Include:
┌─ Testing Frameworks Layer ─┐
• Cypress, JUnit, Robot... │
• SDK Layer ─────────┤
• .NET, Java, JS, Python │
• Common Core Layer ────┤
• GraphQL, Auth, Visual │
• External APIs ──────┘
Remember to:
• Clear separation of concerns
• Cross-SDK commonalities
• Error handling and retry mechanisms
• Test result processing flow