<div class="gmail_quote">On Thu, May 19, 2011 at 16:32, Pete Royle <span dir="ltr">&lt;<a href="mailto:howardmoon@screamingcoder.com">howardmoon@screamingcoder.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi,<br>
<br>
The Seam Cron module has many providers and I&#39;d like to test each<br>
provider by reusing the same test suite (Arquillian), but just having a<br>
different provider on the classpath . Kind of TCK style I think.<br>
<br>
So I would have several provider projects, plus a tck project containing<br>
all the common test classes. I guess then each provider project would<br>
depend on the tck (scope: test) so that the tck tests, plus any of its<br>
own unit tests are all run during that provider&#39;s test phase.<br>
<br>
My concerns with this so far are:<br>
<br>
1. I think I will need a test suite with the test classes in<br>
src/main/java (rather than src/test/java) so that the provider can get<br>
those classes onto its own classpath during testing. Will Arquillian<br>
work OK like that (ie: does it have maven integration which specifically<br>
looks under src/test/java only)?<br></blockquote><div><br></div><div>No, there&#39;s nothing in there that I&#39;m aware of that would prohibit this approach.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


2. The classes in the test suite have a hard-coded @Deployment, and I&#39;m<br>
not sure how I&#39;d go about customising that place a different provider<br>
class on the classpath. I don&#39;t want to have to force my providers to<br>
extend every test case just to customise the deployment.<br></blockquote><div><br></div><div>You&#39;re @Deployment should be in the test class, but that doesn&#39;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.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
3. Am I going about this all wrong?<br></blockquote><div><br></div><div>Sounds like a good way to accomplish the task to me.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


Cheers for any advice you can give me.<br>
<br>
Pete R<br>
<br>
<br>
_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Jason Porter<br><a href="http://lightguard-jp.blogspot.com" target="_blank">http://lightguard-jp.blogspot.com</a><br><a href="http://twitter.com/lightguardjp" target="_blank">http://twitter.com/lightguardjp</a><br>

<br>Software Engineer<br>Open Source Advocate<br>Author of Seam Catch - Next Generation Java Exception Handling<br><br>PGP key id: 926CCFF5<br>PGP key available at: <a href="http://keyserver.net" target="_blank">keyserver.net</a>, <a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>