代号One-Test Recorder:在真实设备上执行测试 [英] Codename One - Test Recorder: execute a test on a real device

查看:75
本文介绍了代号One-Test Recorder:在真实设备上执行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Codename One的开发人员指南中这样写:«Codename One包含内置的测试框架和测试记录器工具,作为模拟器的一部分。这使开发人员可以在Codename One的基础上构建功能测试和单元测试执行。它甚至可以发送测试以在设备上执行(仅支持专业功能)。»

In the developer guide of Codename One, it's written so: «Codename One includes a built in testing framework and test recorder tool as part of the simulator. This allows developers to build both functional and unit test execution on top of Codename One. It even enables sending tests for execution on the device (pro-only feature).»

使用专业版帐户,在真实设备上进行测试的步骤是什么? ?

Using a pro account, what are the steps to do a test on a real device?

推荐答案

您需要设置构建提示 build.unitTest = 1 将会构建仅执行单元测试的应用程序版本。如果没有持续集成(这是一项企业功能),这将没有用...

You need to set the build hint build.unitTest=1 which will build a version of the app that just executes the unit tests. This isn't as useful without continuous integration which is an enterprise feature...

要实现此目的,您可以执行类似将构建目标添加到ant文件的操作:

To implement this you can do something like add a build target to your ant file:

<target name="test-for-ios-device" depends="clean,copy-ios-override,copy-libs,jar,clean-override">
    <codeNameOne 
        jarFile="${dist.jar}"
        displayName="${codename1.displayName}"
        packageName = "${codename1.packageName}"
        mainClassName = "${codename1.mainName}"
        version="${codename1.version}"
        icon="${codename1.icon}"
        vendor="${codename1.vendor}"
        subtitle="${codename1.secondaryTitle}"
        buildArgs="build.unitTest=1"
        targetType="iphone"
        certificate="${codename1.ios.debug.certificate}"
        certPassword="${codename1.ios.debug.certificatePassword}"
        provisioningProfile="${codename1.ios.debug.provision}"
        appid="${codename1.ios.appid}"
        />
</target>

使用企业版,您可以执行同步构建,获取结果,然后在使用appium的设备上运行等等。我们很快会为您提供指南。

With the enterprise version you can do a synchronized build, get the result then run it on devices using appium etc. We'll come up with a guide for that soon.

这篇关于代号One-Test Recorder:在真实设备上执行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆