Airbnb Jul 7, 2020

Better Android Testing at Airbnb (Part 4: Testing ViewModels)

Article Summary

Airbnb built a testing framework so elegant that their ViewModels tests read like plain English. Here's how they made testing actually enjoyable.

Eli Hart from Airbnb Engineering shares their custom unit testing framework for Android ViewModels. The approach transforms verbose test code into a clean DSL that prioritizes developer experience without sacrificing flexibility.

Key Takeaways

Critical Insight

Airbnb reduced testing friction across hundreds of modules with a DSL that makes ViewModel tests readable and maintainable.

The framework's extensible architecture lets teams add custom assertions for any dependency pattern they encounter.

Recent from Airbnb

Related Articles