从 ant 脚本执行 java 类文件

发布于 2024-09-28 02:35:46 字数 49 浏览 2 评论 0原文

我需要从 ant 脚本运行一个 java 类(实际上是一个测试用例)。可以这样做吗?

I need to run a java class (actually a test case) from ant script. Is it possible to do so?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

执笏见 2024-10-05 02:35:46

在最基本的级别上,您可以使用 ant java 执行此操作的任务。

但是你用 junit4 标记 - 你不能使用 ant junit< /a> 任务?

At the most basic level you could use the ant java task to do this.

But you tagged with junit4 - can you not use the ant junit task?

失眠症患者 2024-10-05 02:35:46

要执行java类,您可以使用java任务 http://ant.apache.org/manual /Tasks/java.html

执行 junit 测试用例: http://ant .apache.org/manual/tasksoverview.html#testing

To execute java class, you can use java task http://ant.apache.org/manual/Tasks/java.html

To execute junit test cases: http://ant.apache.org/manual/tasksoverview.html#testing

痴情 2024-10-05 02:35:46

尝试 java 任务。如果你想运行测试,你可能想看看 JUnit

Try the java task. If you want to run tests, you might want to take a look at JUnit

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文