Hi,

Just committed discussed alternative.

-Pjaxrs : profile activates CXF related integration tests (Spring MVC ones will 
not be active)
-Djaxrs.content.type=application/xml : specifies non-default content type 
(default is application/json)

Running individual tests is possible again.

Cheers,
Andrei.

> -----Original Message-----
> From: Andrei Shakirin [mailto:ashaki...@talend.com]
> Sent: Samstag, 26. Januar 2013 17:59
> To: dev@syncope.apache.org
> Subject: RE: [Discuss] Way to parameterize integration tests
> 
> Hi Francesco,
> 
> > > 2.       Leave single test classes and configure contentType in 
> > > AbstractTest
> > with default value JSON. Normally run only JSON tests (like now). Make
> > XML tests runnable via separate profile / configuration.
> >
> > +1
> 
> Will redesign it in this way and will try to commit until Monday.
> 
> Andrei.
> 
> > -----Original Message-----
> > From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
> > Sent: Freitag, 25. Januar 2013 18:01
> > To: dev@syncope.apache.org
> > Subject: Re: [Discuss] Way to parameterize integration tests
> >
> > On 25/01/2013 17:39, Andrei Shakirin wrote:
> > > Hi,
> > >
> > > One more topic to discuss:
> > > Currently integration tests run using communication using JSON
> > contentType only.
> > > For new CXF-based tests we are going to run every tests twice: with
> > > XML
> > and JSON [1].
> > >
> > > JUnit proposes elegant solution using parameterized tests:
> > http://junit.sourceforge.net/javadoc/org/junit/runners/Parameterized.h
> > tml
> > .
> > > Basically it works fine, but unfortunately (as Francesco already
> > > noted)
> > individual tests cannot be executed from Surefire or Failsafe plugins
> > as well as from some IDEs.
> >
> > The ability we've had so far to execute a single IT case is of
> > fundamental importance to speed up the development process.
> >
> > > The problem is that Parameterized runner expect individual test
> > description in form ClassName#MethodName[Number]. This form cannot
> be
> > specified in maven command line, because method name will be not
> > correctly resolved.
> > > I do not see any acceptable solution for Parameterized runner now
> > > and
> > propose following alternatives:
> > >
> > > 1.       Create two classes per each test inherited from common parent for
> all
> > CXF tests (e.g. AuthenticationTestXMLTestITCase,
> > AuthenticationTestJsonTestITCase). Always run both variants.
> > >
> > > 2.       Leave single test classes and configure contentType in 
> > > AbstractTest
> > with default value JSON. Normally run only JSON tests (like now). Make
> > XML tests runnable via separate profile / configuration.
> >
> > +1
> > I don't like the idea of duplicating test cases, so if we have an easy
> > way to activate "contentType = XML" it would be acceptable.
> >
> > > 3.        ...
> >
> > Regards.
> >
> > > [1] https://issues.apache.org/jira/browse/SYNCOPE-289
> >
> > --
> > Francesco Chicchiriccò
> >
> > ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> > http://people.apache.org/~ilgrosso/

Reply via email to