【问题标题】:How to verify that app has been instrumented in calabash?如何验证该应用程序已在葫芦中检测?
【发布时间】:2014-07-27 17:31:27
【问题描述】:

我想自动化 Xamarin android 应用程序,我计划为其使用 Calabash 自动化工具。我是这个工具的新手。

我已经在我的系统上成功安装了 Ruby、Ant 和 SDK。

运行 calabash-android 运行命令后,我得到以下日志:-

2014-07-25 12:13:42 - Installing: C:/Users/<path to apk>
4150 KB/s (11783001 bytes in 2.772s)
2014-07-25 12:13:50 -   pkg: /data/local/tmp/xxx.apk


Success

2014-07-25 12:13:51 - Starting test server using:

2014-07-25 12:13:51 - "D:\softwares\adt-bundle-windows-x86-20140321\sdk/platform
-tools/adb.exe" -s 3230a28fb94fb09b shell am instrument -e target_package com.xxx.android -e main_activity xxx.app.android.activities.StartActivity -e test_
server_port 7102 -e class sh.calaba.instrumentationbackend.InstrumentationBacken
d com.xxx.android.test/sh.calaba.instrumentationbackend.CalabashInstrumentatio
nTestRunner

2014-07-25 12:13:53 - It looks like your app is no longer running.

It could be because of a crash or because your test script shut it down.

2014-07-25 12:13:54 - Checking if instrumentation backend is ready

2014-07-25 12:13:54 - Is app running? true

2014-07-25 12:13:54 - Instrumentation backend not yet ready

2014-07-25 12:13:57 - Checking if instrumentation backend is ready

2014-07-25 12:13:57 - Is app running? true

2014-07-25 12:13:57 - Instrumentation backend is ready!

2014-07-25 12:13:57 - Checking client-server version match...

2014-07-25 12:13:57 - Action: version - Params:

2014-07-25 12:13:57 - Result:'{"bonusInformation":[],"message":"0.5.0","success"
:true}'

2014-07-25 12:13:57 - Client and server versions match. Proceeding...

我只是想确认我的 apk 是否经过检测?有什么方法可以验证吗?

【问题讨论】:

    标签: android ruby xamarin calabash


    【解决方案1】:

    转到您的 .apk 路径并运行以下命令,然后查看您的应用启动与否的天气。

    calabash-android console path-to-your-app.apk
    

    在此之后,irb 控制台会话应该开始

    start_test_server_in_background
    

    您的应用应该由命令本身启动。

    【讨论】:

    • 上述步骤对我有用。即使在那之后错误“android.test没有被安装。原因:'Aborted'。Aborting!(RuntimeError)./features/support/app_installation_hooks.rb:19:in `Before'将不会启动测试服务器,因为以前的失败. (RuntimeError) "
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-02
    • 1970-01-01
    • 2019-02-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多