I've accomplished something similar in the past using a @RunsWith and a custom runner. On Mar 17, 2011 6:53 AM, "Steve Ebersole" <[email protected]> wrote: > I am developing a custom JUnit runner to cover certain requirements we have in > testing. Part of this is to skip or ignore certain tests based on certain > conditions. To handle this I decded to leverage org.junit.Ignore since IDEs > already understand this. But I do not leverage it in terms of annotating test > methods with it; like I said, the skipping/ignoring is contextual. So instead > I extend org.junit.runners.model.FrameworkMethod and override > org.hibernate.testing.junit4.ExtendedFrameworkMethod#getAnnotation to return > an org.junit.Ignore instance if that was the annotation asked for and the skip > conditions were met. > > Anyway, bottom line, this works great in my IDE. However, when I run this > from Gradle I end up with a failed execution. Every test that meets the > skip/ignore conditions is marked as a fail. From what I can tell Gradle is
> layering in its own org.junit.runner.Runner which I assume is casuing > difficulty here. > > Does this ring any bells? I am inclined to believe this is a bug in Gradle. > > > --- > Steve Ebersole <[email protected]> > http://hibernate.org > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > >
