在 grails 中使用 junit 4 [英] using junit 4 in grails

查看:16
本文介绍了在 grails 中使用 junit 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 grails 测试中使用一些 JUnit 4 功能,但目前 grails 测试在 JUnit 3 下运行.JUnit 4 可以从 groovy 使用,但用 JUnit 4 替换 grails 中的 JUnit jar 似乎没有启用我正在寻找的功能.

I'd like to use some JUnit 4 functionality in my grails testing, but currently grails tests run under JUnit 3. JUnit 4 can be used from groovy but replacing the JUnit jar within grails with a JUnit 4 one doesn't seem to enable the functionality I'm looking for.

有人知道如何让 grails 使用 junit 4 运行我的测试吗?

Anyone know how I can get grails to run my tests with junit 4?

推荐答案

只要您使用的是 Groovy 1.5+ 和 Java 5+,您就可以将 JUnit 4 与 Grails 一起使用:

You can use JUnit 4 with Grails as long as you're using Groovy 1.5+ and Java 5+:

http://groovy.codehaus.org/Using+JUnit+4+with+Groovy

这篇关于在 grails 中使用 junit 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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