简体   繁体   English

Grails 2.0.0 JUnit测试@RunWith注释等效

[英]Grails 2.0.0 JUnit test @RunWith annotation equivalent

So my understanding is that the grails testing framework is backed by JUnit tests. 因此,我的理解是grails测试框架由JUnit测试支持。

I am trying to hook in cucumber-jvm, and the simplest way appears to be to have a JUnit test with the annotations @RunWith(Cucumber.class) and @Feature(".") 我正在尝试挂接到Cucumber-jvm,最简单的方法似乎是使用带有@RunWith(Cucumber.class)和@Feature(“。”)批注的JUnit测试。

Those annotations appear to be ignored when I build test classes however. 但是,当我构建测试类时,这些注释似乎被忽略了。 I suspect my groovy test classes aren't exactly picked up as JUnit test cases in the normal way. 我怀疑我的常规测试类没有像正常情况下那样准确地用作JUnit测试用例。

Is there any way to get the equivalent of those annotations working in grails? 有什么方法可以使这些注释在grails中起作用吗?

I am using Cucumber-JVM and Geb to functionally test some of our internal grails apps, using this grails plugin http://grails.org/plugin/cucumber 我正在使用Cucumber-JVM和Geb通过此grails插件http://grails.org/plugin/cucumber对我们的一些内部grails应用进行功能测试。

So far so good, I haven't used the annotations you mention however. 到目前为止,到目前为止,我还没有使用您提到的注释。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM