Hi Sahoo, first of all, we're talking about 2.4.0-SNAPSHOT here, so this new mechanism is not yet final...
There is a new ConfigurationManager which reads configuration properties from a hierarchy of property files or system properties. Now this is _not_ intended to be a replacement for Java options. There is only a very small number of properties so far, and the intent is to - define machine specific settings you don't want to hard-code in your test classes (e.g. things like the server home directory for new test containers using an external Java EE server) - override the default options created by Exam itself All options defined in your @Configuration method are added to the list of predefined options, but in Pax Exam 2.3.0, there is no way to remove or replace the default options. So by setting the new pax.exam.system property, you can select between a small number of predefined option sets. "test" gives you the defaults of Pax Exam 2.3.0, and "default" gives you an empty list. (The term "default" is rather overloaded in this context, which is confusing and mainly due to the current implementation in DefaultExamSystem - this calls for some further refactoring...) Anyway, to avoid repeating the same set of options in all your tests, you can use composite options. This works in Pax Exam 2.3.0 and earlier releases and is independent of the new property mechanism. You just need to define a composite option in a static method somewhere and then include this one option in all your tests. See [1] for an example from Exam's own regression tests. [1] https://github.com/ops4j/org.ops4j.pax.exam2/blob/master/itest/src/it/regression-multi/src/test/java/org/ops4j/pax/exam/regression/multi/RegressionConfiguration.java Hope that helps, Harald 2012/1/13 Sanjeeb Sahoo <[email protected]>: > Hi Harald, > > Could you please send a pointer to this new configuration thing of 2.4.0 you > mentioned below? I am interested to know how to change the defaults of > various options, as I think it is a bit of a pain to specify things like > "exam time out" in every test. > > Thanks, > Sahoo > _______________________________________________ general mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/general
