我的Android应用程序必须在第一次同步数据。它花费了大约15分钟的时间进行同步。第二次,我不需要从服务器获取数据。但是当运行calabash功能:calabash运行MyApp.apk时,我觉得它删除了我的应用程序中的所有数据,并重新构建了应用程序。那么,当我为应用程序运行功能场景时,如何保存数据呢?
我的场景:
Feature: create work order作为一名技术专家,我想要创建工作订单,这样我就可以更容易地管理WO。
场景:技术员成功地创建了工作订单
Given I am on the Create Work Order Screen
And I select customer name which is "Harris Teeter"
And I select equipment serial number which is "1A100438"
And I select Job code "1" and then is "100 HOUR SERVICE"
And I select order type "401"
And I input valid title "Create new work order"
And I input valid description "Work order description"
Then I see the successful messages "The new work order has been created successfully"发布于 2013-09-28 17:52:17
尝试命令
NO_LAUNCH=1 cucumber --format html --out index.html features/Your_feature_file.feature它不会重新启动你的应用程序。但是在运行此命令之前,您需要首先运行该应用程序。只要你的应用程序在前台,这个命令就能工作。
注意:我用这个来测试iPhone,它也应该在安卓上工作。
发布于 2014-11-03 02:48:30
这是因为在运行每个场景之前,calabash重新安装应用程序。为了避免这种情况,您可以在android支持文件夹中的app_installation_hooks.rb文件中注释这段代码。
uninstall_apps
install_app(ENV["TEST_APP_PATH"])
install_app(ENV["APP_PATH"])https://stackoverflow.com/questions/19048895
复制相似问题