Duration: 2 Days
Course Overview
This advanced TDD course is designed for experienced mobile engineers who want to master test-first development approaches in both greenfield and legacy contexts. Day 1 focuses on refining TDD techniques for new Kotlin and Swift codebases, covering advanced testing patterns, architecture design through tests, and modern mobile development practices. Day 2 tackles the complex challenges of applying TDD principles to legacy mobile applications, teaching practical strategies for safely introducing tests and refactoring existing code. The course emphasizes real-world scenarios that mobile engineers face daily, with hands-on exercises using contemporary mobile development frameworks and tools.
COURSE OBJECTIVES
At the end of this course, students should be able to:
• Master advanced TDD techniques for greenfield mobile development
• Design clean architecture through test-first approaches
• Implement sophisticated testing strategies for mobile UI and business logic
• Apply TDD principles to legacy mobile codebases safely and effectively
• Break complex dependencies in existing mobile applications
• Use advanced mocking and testing frameworks (MockK, XCTest, etc.)
• Implement characterization tests and safe refactoring techniques
• Integrate TDD practices into modern mobile development workflows
Course Content
1 . Mastering TDD for New Mobile Development
2 . Advanced TDD Principles and Mindset
• Red-Green-Refactor at scale: beyond the basics
• TDD mindset for mobile development challenges
• When and when not to use TDD in mobile contexts
• Test-first vs test-after: advanced decision making
3 . Modern Mobile Testing Infrastructure
• Advanced Kotlin testing: Kotest, MockK, and Turbine
• Swift testing evolution: XCTest, Quick/Nimble, and modern approaches
• Testing architecture setup for greenfield mobile projects
• CI/CD integration for test-first mobile development
4. Designing Architecture Through Tests
• Test-driving Clean Architecture in mobile apps
• MVVM and MVI patterns through TDD
• Repository pattern and data layer testing
• Dependency injection containers and testable architecture
5 . Advanced Mobile UI Testing Strategies
• Test-driving Android Compose UI components
• Test-driving SwiftUI views and interactions
• Screen-level testing vs component-level testing
• Navigation and state management through tests
6 . Business Logic and Domain Testing
• Test-driving use cases and business rules
• Domain model design through tests
• Handling async operations: Coroutines and Combine
• Error handling and edge case testing
7 . Integration Testing and External Dependencies
• Network layer testing with real and mock responses
• Database testing: Room and Core Data
• Testing platform-specific integrations
• Contract testing for API interactions
8 . Legacy Mobile Code Assessment and Strategy
• Identifying legacy mobile app pain points
• Risk assessment for legacy mobile refactoring
• Creating a testing strategy for existing mobile apps
• Prioritizing areas for test coverage
9 . Characterization Testing for Mobile Apps
• Capturing existing mobile app behaviour
• Golden master testing for UI components
• API interaction characterization
• Performance baseline testing
10 . Breaking Dependencies in Legacy Mobile Code
• Identifying and isolating Android activity/fragment dependencies
• Breaking iOS view controller and UIKit dependencies
• Singleton elimination in mobile contexts
• Network and persistence layer seams
11 . Advanced Mocking for Legacy Mobile Systems
• Mocking complex Android framework dependencies
• iOS system framework mocking strategies
• Partial mocking and spy techniques
• Testing legacy networking and data persistence
12 . Safe Refactoring Techniques for Mobile Apps
• The Strangler Fig pattern in mobile app contexts
• Feature flag-driven legacy migration
• Modularization through tests
• Incremental architecture improvements
13 . Legacy Mobile-Specific Challenges
• Testing legacy Android activities and fragments
• Legacy iOS view controller testing approaches
• Objective-C interop testing in Swift apps
• Legacy navigation and state management testing
14 . Workshop: Real-World Legacy Mobile Scenarios
• Hands-on: Legacy Android app testing scenario
• Hands-on: Legacy iOS app testing scenario
• Group exercise: Strategy planning for participants’ real projects
• Best practices synthesis and action planning
COURSE PREREQUISITES
• Advanced experience with Kotlin and/or Swift mobile development
• Current experience writing unit and integration tests
• Working knowledge of mobile app architecture patterns (MVVM, Clean Architecture, etc.)
• Experience with dependency injection and modern mobile development frameworks