【发布时间】:2015-06-14 04:17:23
【问题描述】:
背景:
我想使用 appium 在 android 和 ios 模拟器中测试我的应用程序。我在 Python 中运行测试,我想拥有它,以便测试的工作流程始终如下:
if first test to be ran:
reset any previous data
launch simulator and application
do test
close application and save state
else:
launch application
do test
close application and save state
if last test:
reset any saved data
我相信正确的方法是包含--no-reset 服务器标志,然后在测试之间使用driver.launch_app() 和driver.close_app(),但是我不确定如何在最后一次测试中重置任何保存的数据.
感谢您的帮助。
【问题讨论】:
-
我找到了一种删除iOS数据的方法,可以在终端中运行以下行:
xcrun simctl erase <insert UDID here>
标签: android python ios reset appium