Android UI自动化测试神器-Espresso录制
Espresso Test Recorder的好处 直接录制与APP的所有交互操作 支持在录制过程中添加断言 可直接生成可回放的测试脚本,基本不需要做任何修改 原文地址: Create UI Tests with Espresso Test Recorder,以下为正文 注意: Espresso Test Recorder在AndroidStudio 2.2 Beta版本之后才有。 Espresso Test Recorder可以在不写一行代码的情况下创建UI测试。通过录制一个测试场景,你可以记录设备的交互并在APP的部分快照中添加断言来验证元素。Espresso Test Recorder会保存录制并自动生成对应的UI测试,并可直接运行来测试你的APP。 Espresso Test Recorder编写的测试基于Espresso Testing framework,API在Android Testing Support Library。Espresso API鼓励你创建基于用户操作的简洁且可信赖的UI测试。通过使用expectations、interactions和assertions而不是底层APP的Activity和Views,这样的结构防止了测试的脆弱性并优化测试运行速度。 ...