<div class="gmail_quote">On Thu, May 19, 2011 at 21:26, 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;">




  

<div bgcolor="#ffffff" text="#000000">
Hi Jason,<div class="im"><br>
<blockquote type="cite">
  <div class="gmail_quote">
  <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">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>
</blockquote></div>
You&#39;re right of course. The thing that seems to be getting in my way is
actually the Surefire Maven plugin. I&#39;ve created the TCK project
separately and configured the Compile plugin to generate a
seam-cron-asynchronous-tck-tests.jar which I&#39;m then including in the
asynchronous provider&#39;s project like so:<br>
<br>
        &lt;dependency&gt;<br>
            &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;<br>
           
&lt;artifactId&gt;seam-cron-asynchronous-tck&lt;/artifactId&gt;<br>
            &lt;version&gt;${project.version}&lt;/version&gt;<br>
            &lt;type&gt;test-jar&lt;/type&gt;<br>
            &lt;scope&gt;test&lt;/scope&gt;<br>
        &lt;/dependency&gt;<br>
<br>
However Maven still concludes that there aren&#39;t any test to run for
that project. I suppose that&#39;s for good reason, but I&#39;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&#39;ll keep trying but please chime in if
anyone has any ideas.</div></blockquote><div><br></div><div>Here&#39;s the &quot;official way&quot; of doing it: <a href="http://maven.apache.org/guides/mini/guide-attached-tests.html">http://maven.apache.org/guides/mini/guide-attached-tests.html</a> </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000"><div class="im">
<blockquote type="cite">
  <div class="gmail_quote">
  <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;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>
</blockquote></div>
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).<br></div></blockquote><div><br></div><div>You could simply call the method and then modify or merge the two archives together.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div bgcolor="#ffffff" text="#000000">
Cheers,<br>
<br>
Pete R<br>
</div>

</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>