Android Testing: UIAutomator vs Espresso

后端 未结 7 1301
醉酒成梦
醉酒成梦 2020-12-04 15:32

I was seeking for test frameworks for Android UI automation and I stumbled upon UI Automator and Espresso and this is the part I am confused about

7条回答
  •  旧巷少年郎
    2020-12-04 15:34

    Actually, you don't need to choose. UIAutomator and Espresso use the same instrumentation runner, so you can use commands from both of them in a single test. Espresso has variety of matchers, assertions and actions on UI, that automator doesn't have:

    Espresso Cheat Sheet

    Espresso is running in separate thread and it is really fast comparing to other test frameworks.

    as Summary: use both of them in your tests, Espresso is main and UIAutomator as an additional tool for OS integration.

提交回复
热议问题