【问题标题】:How do I run Tinytest on an android device for testing package for meteor-cordova app?如何在 android 设备上运行 Tinytest 以测试 meteor-cordova 应用程序包?
【发布时间】:2015-06-29 00:27:32
【问题描述】:

我想在 Android 设备上使用 Tinytest 测试流星包的 cordova 特定功能。所以我尝试了here找到的步骤。

我的测试文件cordova-test.js 只包含以下内容

if (Meteor.isCordova) {
   Tinytest.add("cordova-package - First Test ", function(test) {
       test.equal(1, 1, "Equal test");
   });
}

我的package.js有以下Package.onTest()

 Package.onTest(function(api) {
  api.use(['tinytest','test-helpers']);
  api.use('sujith3g:cordova-package');
  api.addFiles('tests/cordova-test.js', "client");
});

我使用meteor test-packages --android-device ./ 命令来执行测试。 然后它给了我

测试中..

android设备上的消息很久了,甚至没有开始测试。我是否需要做任何其他事情来使用 Tinytest 在 android 设备上测试包?请帮帮我。

【问题讨论】:

    标签: cordova meteor tinytest


    【解决方案1】:

    在尝试了meteor test-packages 的所有组合之后,我通过使用它让它在 android 设备上运行。

    meteor test-packages --android-device ./ --mobile-server http://192.168.1.4:3000

    需要 mobile-server(--mobile-server http://<host>:<port>) 参数才能在 android 设备上运行

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-07
      • 1970-01-01
      • 2014-03-26
      • 1970-01-01
      • 1970-01-01
      • 2014-08-01
      • 2015-08-13
      • 2019-11-20
      相关资源
      最近更新 更多