如何使用Ant从Eclipse来运行JUnit测试插件 [英] How to run a Junit Plugin Test using Ant from eclipse

查看:329
本文介绍了如何使用Ant从Eclipse来运行JUnit测试插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何运行命令promot使用蚂蚁从Eclipse的一个JUnit测试插件,也。即时通讯使用Junit4.4

how can we run a junit plugin test using ant from eclipse, also from command promot. Im using Junit4.4

推荐答案

org.eclipse.test 插件提供了 library.xml 文件,其中包含蚂蚁任务无论是在UI( UI测试目标)和无头(核试验目标)模式。下面调用任务的例子,你需要提供一些属性适合自己的环境,并检查 org.eclipse.test 插件版本:

The org.eclipse.test plugin provides a library.xml file that contains ant tasks for running plugin tests both in UI (ui-test target) and headless (core-test target) modes. Example of invoking the task below, you'll need to provide a few properties to suite your own environment and check the org.eclipse.test plugin version:

<property name="library-file"
    value="${eclipse-home}/plugins/org.eclipse.test_3.2.0/library.xml" />

...

    <ant target="ui-test" antfile="${library-file}"
        dir="${eclipse-home}">
        <property name="data-dir" value="${workspace}" />
        <property name="plugin-name" value="${plugin-name}" />
        <property name="classname"
            value="com.example.MyTestSuite" />
        <property name="junit-report-output" value="${results.dir}"/>
    </ant>

这篇关于如何使用Ant从Eclipse来运行JUnit测试插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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