本文介绍了黄瓜JVM ant任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何知道蚂蚁的文件夹中执行所有黄瓜测试(功能,实现)?

我坚持用这个例子

 <目标名称=runcukes依赖=编译 - 测试>
        < MKDIR DIR =目标/黄瓜的JUnit报告/>
        < Java类名=cucumber.cli.Main叉=真failonerror =false的resultproperty =cucumber.exitstatus>
            <类路径REFID =类路径/>
            < ARG值= - 格式/>
            < ARG值=JUnit的:目标/黄瓜的JUnit报告/ allcukes.xml/>
            < ARG值= - 格式/>
            < ARG值=pretty/>
            < ARG值= - 格式/>
            < ARG值=HTML:目标/黄瓜HTML的报告/>
            < ARG值= - 胶/>
            < ARG值=cucumber.examples.java.helloworld/>
            < ARG值=的src /测试/资源/>
        < / JAVA>        < junitreport todir =目标/黄瓜的JUnit报告>
            <文件集DIR =目标/黄瓜的JUnit报告>
                <包括姓名=allcukes.xml/>
            < /文件集>
            <报告格式=帧todir =目标/黄瓜的JUnit报告/>
        < / junitreport>        <失败消息=黄瓜失败>
            <条件>
                <而非>
                    &所述;等于ARG1 =$ {cucumber.exitstatus}ARG2 =0/>
                < /&不GT;
            < /条件>
        < /失败>
    < /目标与GT;


解决方案

Options:

-g, --glue PATH Where glue code (step definitions and hooks) is loaded from.
-f, --format FORMAT[:OUT] How to format results. Goes to STDOUT unless OUT is specified.
                                Available formats: junit, html, pretty, progress, json, json-pretty.
-t, --tags TAG_EXPRESSION Only run scenarios tagged with tags matching TAG_EXPRESSION.
-n, --name REGEXP Only run scenarios whose names match REGEXP.
-d, --dry-run Skip execution of glue code.
-m, --monochrome Don't colour terminal output.
    --dotcucumber Where to write out runtime information.
-v, --version Print version.
-h, --help You're looking at it.

In your case - change the <arg value="src/test/resources"/> to directory you want to run against. Note that you can specify multiple individual files and directories space-separated.

这篇关于黄瓜JVM ant任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-24 19:39