Hi Toni, Yeah you're right, it wasn't so much a pax-exam issue. This is in fact the direction we went and had some success in what we wanted.
Just fyi, this thread - http://www.mail-archive.com/[email protected]/msg46902.html - describes exactly what we were trying to achieve. Looks like it isn't fully possible because of some sure-fire plugin limitations. Anyway, thanks again for the suggestion and help. Mohnish On Fri, Sep 4, 2009 at 6:17 AM, Toni Menzel<[email protected]> wrote: > have you had a look > at http://maven.apache.org/guides/mini/guide-attached-tests.html ? > Actually, things may not be related to exam but to the maven surefire plugin > (which runs the tests originally, same as normal junit tests). Is this > correct ? Or am i still on the wrong spot ? > cheers, > Toni > On Wed, Sep 2, 2009 at 8:49 PM, Mohnish Rao <[email protected]> wrote: >> >> Toni, >> >> Thanks for your response and suggestion. >> >> I guess I failed to mention that all of the projects are already >> grouped together. There is one "parent" pom which lists them as >> modules. When "mvn clean test" is executed from this level, all the >> tests do in fact run. It's just that the tests run independently. >> api-func-tests are built, deployed and executed. They exercise >> ref-impl because it's listed as a dependency in the api-func-tests >> pom. What we'd like is when it gets to real-impl-func-tests, for >> api-func-tests to be bound to real-imp and exercise that. Essentially >> we want to avoid duplicating the api-func-tests for both ref and real >> impls. >> >> We want to have a set of implementation independent tests and then >> bind them to a specific implementation at a later time. >> >> Thanks, >> Mohnish >> >> On Wed, Sep 2, 2009 at 12:23 AM, Toni Menzel<[email protected]> wrote: >> > Hi Mohnish, >> > this sounds more like a maven related thing if i understand correctly. >> > You want to run api-func-tests as a sideeffect "automatically" whenever >> > real-impl-func-tests are run, correct ? >> > Since they are currently unrelated maven projects, the only thing to >> > trigger >> > them - and just them - together is by grouping the modules together in >> > the >> > super pom using maven profiles: >> > <profile> >> > <id>realFuncTest</id> >> > <modules> >> > <module>api-func-test</module> >> > <module>real-func-test</module> >> > </modules> >> > </profile> >> > Then you run from parent dir with "mvn clean test -PrealFuncTest". >> > To me, as long as the tests are in different projects, there's no other >> > way >> > to control the "run them together" than using the parent pom. >> > This has also to do with the fact that, in exam, we run things like in >> > normal junit tests, even using surefire/maven junit plugins to execute. >> > As >> > far as i know, there's no such thing as running tests automatically >> > before >> > running another. >> > Anyhow, there might me a way doing this, but this needs an extension in >> > pax >> > exam to >> > 1. configure "automatically" triggered tests in certain form >> > 2. run them once triggered. >> > The solution i have in mind could probably work with doable effort. >> > If you feel the stuff written here is what you want, feel free to add a >> > new >> > feature request to http://issues.ops4j.org >> > for this. >> > Have a nice day, >> > Toni >> > On Wed, Sep 2, 2009 at 3:38 AM, Mohnish Rao <[email protected]> wrote: >> >> >> >> Hi guys, >> >> >> >> Had a question w.r.t configuring pax-exam to run tests in a maven >> >> project. >> >> >> >> Here's the project structure that we currently have: >> >> >> >> /api >> >> /reference-impl >> >> /api-func-tests >> >> /real-impl >> >> /real-impl-func-tests >> >> >> >> These are all separate projects with independent pom.xml files. >> >> >> >> Right now, both api-func-tests and real-impl-func-tests contain JUnit >> >> tests that are run using pax-exam's MavenConfiguredJunitTestRunner. >> >> The api-func-tests are bound to the reference-impl. >> >> >> >> What we're looking to do is to be able to 'refer' to the >> >> api-func-tests (maybe as a dependency) from real-impl-func-tests and >> >> execute them as well. So, in addition to the real-impl specific func >> >> tests, we want to be able to run the api-func-tests... at which point >> >> it will be bound to real-impl. >> >> >> >> Is there any way configure pax-exam to do this? Or any suggestions for >> >> modifying the project structure to enable this? >> >> >> >> Thanks, >> >> Mohnish >> >> >> >> _______________________________________________ >> >> general mailing list >> >> [email protected] >> >> http://lists.ops4j.org/mailman/listinfo/general >> > >> > >> > >> > -- >> > Toni Menzel >> > Independent Software Developer >> > Professional Profile: http://okidokiteam.com >> > [email protected] >> > http://www.ops4j.org - New Energy for OSS Communities - Open >> > Participation Software. >> > >> > >> > _______________________________________________ >> > general mailing list >> > [email protected] >> > http://lists.ops4j.org/mailman/listinfo/general >> > >> > >> >> _______________________________________________ >> general mailing list >> [email protected] >> http://lists.ops4j.org/mailman/listinfo/general > > > > -- > Toni Menzel > Independent Software Developer > Professional Profile: http://okidokiteam.com > [email protected] > http://www.ops4j.org - New Energy for OSS Communities - Open > Participation Software. > > > _______________________________________________ > general mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/general > > _______________________________________________ general mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/general
