On Thu, May 19, 2011 at 16:32, Pete Royle
<howardmoon@screamingcoder.com> wrote:
Hi,
The Seam Cron module has many providers and I'd like to test each
provider by reusing the same test suite (Arquillian), but just having a
different provider on the classpath . Kind of TCK style I think.
So I would have several provider projects, plus a tck project containing
all the common test classes. I guess then each provider project would
depend on the tck (scope: test) so that the tck tests, plus any of its
own unit tests are all run during that provider's test phase.
My concerns with this so far are:
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.
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.
3. Am I going about this all wrong?
Sounds like a good way to accomplish the task to me.
Cheers for any advice you can give me.
Pete R
_______________________________________________
seam-dev mailing list
seam-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/seam-dev