How to use Dagger
inside our Espresso tests

Categories: Meetups

Jānis Peisenieks

In this session, the speaker explores how to enhance Android app testing by combining Dagger, a powerful dependency injection framework, with Espresso, the widely-used UI testing framework. By leveraging Dagger for dependency injection and mocking, developers can reduce test flakiness and improve the reliability and robustness of their UI tests.

The talk also emphasizes the importance of accessibility-aware testing, demonstrating how incorporating accessibility features in Espresso tests makes them less brittle and more maintainable over time. Additionally, the speaker highlights why Kotlin offers advantages over Java for Android app development, including improved readability, concise syntax, and better integration with modern testing frameworks.

Key insights include:

  • Best practices for combining Dagger and Espresso in Android testing
  • Reducing flaky tests and increasing reliability through mocking and DI
  • Incorporating accessibility features to improve test robustness
  • Advantages of Kotlin for Android development and testing

This talk is ideal for Android app developers, QA engineers, and mobile app development teams looking to enhance their UI testing workflows, write more maintainable tests, and build higher-quality Android applications.

Watch video on our YouTube channel

Share with friends