将 Scala 测试集成到现有 Netbeans Java 项目的最佳方法?

发布于 2024-10-28 15:05:34 字数 305 浏览 5 评论 0 原文

我有一个独立的应用程序,是我在感染测试之前编写的。它是一个 Netbeans gui 项目,所以我依赖 Matisse,而且我不想改变这一点,至少现在不想。

然而,我想建立单元测试覆盖率,并且我想借此机会学习一些 Scala。

所以我想做的是在 scala 中创建测试。我知道这是可能的,因为 Scala Test 有一个 junit 运行程序。我想我可以攻击蚂蚁并最终让它工作,但我认为这将是一种“磅直到合适”的场景。我搜索过Stack Overflow,也有类似的问题,但主题不完全相同。

以前有人这样做过吗?如果是这样,请告诉我如何做。谢谢!

I have a stand-alone application that I wrote before I became test-infected. Its a Netbeans gui project, so I depend upon Matisse, and I don't want to change that, at least not now.

I would, however, like to build the unit test coverage up, and I'd like to take this opportunity to learn some Scala.

So what I would like to do is create tests in scala. I understand that this is possible because Scala Test has a junit runner. I think I could hack on the ant and eventually make it work, but I think that would be sort of a "pound until it fits" scenario. I have searched Stack Overflow, and there are similar questions, but not quite the same topic.

Has anybody done this before? If so, please let me know how. Thanks!

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

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

发布评论

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

评论(1

捶死心动 2024-11-04 15:05:34

我的经验是使用 NetBeans 中的 Maven Java 项目和 Specs 测试框架,所以我不知道这对您是否有帮助或感兴趣。但我希望它可以作为解决您的具体问题的起点。

无论如何,这是我在 Maven 中设置规范来测试 Java Web 服务的详细博客文章:http://janxspirit.blogspot.com/2011/01/sneaking-scala-through-alley-test-java.html

祝你好运!

My experience is with Maven Java projects in NetBeans and the Specs testing framework, so I don't know if this will be helpful or of interest to you. But I hope it can serve as a starting point to solving your specific problem.

In any event, here's a detailed blog post I did on setting up Specs in Maven to test Java web services: http://janxspirit.blogspot.com/2011/01/sneaking-scala-through-alley-test-java.html

Good luck!

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