public abstract class Fixturable {
@Conguration(beforeTest=true, groups="fixture")
public void setupFixture() { ... }
...
}
public void ConcreteTest extends Fixturable {
@Configuration(beforeTest=true, afterGroups="fixture")
public void afterFixture() { ... }
...
}
In the above, the method afterFixture runs /before/ the setupFixture method.
Before I submit a jira issue, might I be doing something wrong?
-barry
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=22816&messageID=44526#44526
I am having a slightly different groups/inheritance problem:
public abstract class Fixturable {
@Conguration(beforeTest=true, groups="fixture")
public void setupFixture() { ... }
...
}
public void ConcreteTest extends Fixturable {
@Configuration(beforeTest=true, afterGroups="fixture")
But even so, why not support partial ordering of groups within a before/after context?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=22816&messageID=44629#44629
If it applies to a method, yes. My example is similar to standard junit idioms where an abstract test class would define hook methods. Of course my difficulties stem from that I'm trying to avoid the "big blob base test class" that has to accomadate thousands of tests.
(And even though most of my current examples have been small, the last trading system I built literally had 10k unit tests and 3k functional tests. The base class(es) for the functional test was a dumping ground. Most funtionality was only applicapable for a small number of tests. I'm hoping to use annotations and my experiment with mixin-fixtures to avoid that this time.)
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=22816&messageID=44630#44630
Perhaps a more concrete example would make my point clearer.
> I guess this is one more reason why I should deprecate @Configuration and
> introduce @BeforeTest and @AfterGroups... this way
> you won't be able to mix them any more.
But even so, why not support partial ordering of groups within a before/after context?
Are you thinking in terms of using a specific annotation for each type (@BeforeSuite/@BeforeTest/etc)
I think this is a good option for this moment. Attributes are becoming too many and may lead to
confusion.