English 中文(简体)
如何监听测试套件更改以更改某些配置
原标题:How to listen to Test Suite changes in order to change some configurations

我有许多春季测试类( 定义为 < code_Runway( SpringJ United4ClassRunner) ), 我想在测试套件中分组, 这样我就能为每个套件加一次新配置, 而不是为每个测试类加一次 。

现在,我有一个TestEductionListener 的收听器来收听每个春季测试, 它将重新装入配置, 但我要保存它, 因为许多测试都有着相同的配置 。

可悲的是, Spring 支持收听 J Unit TestSite JUnited 支持 TestSite 的听众概念。

最佳回答

如果您希望在junit测试套房之前/之后采取行动,您可以使用 < a href="http://kentbeck.github.com/junit/javadoc/latest/org/junit/BeforeClass.html" rel="nofollow" {BeforeClass 和

以产出方式产生:

before
beforeClass
... output from tests
afterClass
after
问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签