我正在为 Android 应用程序进行测试自动化。我目前正在使用适用于 Android 的 eggPlant。我现在的情况总结:
- 我在一台运行 eggOn 并连接到 eggPlant Functional 的 Android 设备上成功运行测试
- eggPlant Functional 正在 Windows 7 Pro(SP1,64 位)机器上运行。
- 我有大约 50 个目前需要自动化的手动功能测试;其中许多将需要一些 adb shell 脚本以及 eggPlant 自动化。
eggPlant 网站上的文档(1和2)讨论了 eggPlant 在本地 shell 上运行命令的能力。这些示例(在撰写本文时)适用于 Mac。我尝试对这些示例进行各种修改以使其在 Windows 上运行,例如:
例如 1
put shell("dir")
例如 2
set the shellCommand to "ShellExecute"
shell "example.bat" //where example.bat contains "dir"
例如 3
shell "C:\Windows\system32\cmd.exe /c dir"
我的最终目标是从 Windows shell 运行 adb 命令。但我面临的问题是:
- 没有任何“原因”的无声失败
- 无法观察命令的输出
我该如何进行?