[weld-dev] [seam-dev] TCK-style testing for Seam Cron Module

Pete Royle howardmoon at screamingcoder.com
Thu May 19 23:26:29 EDT 2011


Hi Jason,
>
>     1. I think I will need a test suite with the test classes in
>     src/main/java (rather than src/test/java) so that the provider can get
>     those classes onto its own classpath during testing. Will Arquillian
>     work OK like that (ie: does it have maven integration which
>     specifically
>     looks under src/test/java only)?
>
>
> No, there's nothing in there that I'm aware of that would prohibit 
> this approach.
You're right of course. The thing that seems to be getting in my way is 
actually the Surefire Maven plugin. I've created the TCK project 
separately and configured the Compile plugin to generate a 
seam-cron-asynchronous-tck-tests.jar which I'm then including in the 
asynchronous provider's project like so:

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>seam-cron-asynchronous-tck</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

However Maven still concludes that there aren't any test to run for that 
project. I suppose that's for good reason, but I'd like to work out how 
I can have these imported tests run by Surefire, rather than just the 
ones in src/test/java. I'll keep trying but please chime in if anyone 
has any ideas.
>
>     2. The classes in the test suite have a hard-coded @Deployment,
>     and I'm
>     not sure how I'd go about customising that place a different provider
>     class on the classpath. I don't want to have to force my providers to
>     extend every test case just to customise the deployment.
>
>
> You're @Deployment should be in the test class, but that doesn't stop 
> you from having a base method that setup everything and just returns 
> an archive you can add to, or even merge(...) in your @Deployement method.
Would this require me to extend each of the TCK test classes in the 
provider project, in order to be able to add to the archive returned by 
the base method? This is something I wanted to avoid (even though it 
would clearly solve problem 1).

Cheers,

Pete R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20110520/6f58fcf1/attachment.html 


More information about the weld-dev mailing list