<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">What about using &lt;excludes&gt; to ignore the Abstract*.class and other similar classes [1] ?<div class="">I don't use any TestSuite class in the JAX-RS tooling component ofJBoss Tools, because I think it's an unnecessary pain to have to maintain an extra/accurate list of all the test classes that need to be run. And I like that some test methods or even test classes can be skipped with the @Ignore annotation.</div><div class=""><br class=""></div><div class="">[1] Here's what I have in my pom.xml:</div><div class=""><br class=""></div><div class=""><div class="">&nbsp; &nbsp; <font face="Courier New" class="">&nbsp; &lt;plugin&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &lt;artifactId&gt;tycho-surefire-plugin&lt;/artifactId&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &lt;configuration&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &nbsp; &lt;includes&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;include&gt;**/*TestCase.class&lt;/include&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/includes&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &nbsp; &lt;excludes&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;exclude&gt;**/Abstract*.class&lt;/exclude&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/excludes&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &nbsp; &lt;/configuration&gt;</font></div><div class=""><font face="Courier New" class="">&nbsp; &nbsp; &lt;/plugin&gt;<span class="Apple-tab-span" style="white-space:pre">        </span></font></div></div><div class=""><br class=""></div><div class=""><div class=""><div class=""><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-align: -webkit-auto; widows: 2; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span style="text-align: -webkit-auto;" class="">Best regards,</span></div></span></span></div></div><div apple-content-edited="true" class=""><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="">/Xavier<br class=""><br class=""><br class=""></div></span></span>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 22 Jan 2015, at 20:51, Nick Boldt &lt;<a href="mailto:nboldt@redhat.com" class="">nboldt@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">No, because then AbstractTest* and TemplateTest* classes would run, and <br class="">they shouldn't be.<br class=""><br class="">You can set your own &lt;include&gt; entries in your root pom. Then all your <br class="">projects' tests will inherit those new rules.<br class=""><br class="">--<br class=""><br class="">We may also have some older JUnit 3 tests (from the JDK 1.4 era?) that <br class="">might still be set to run with older JRE environments, where <br class="">@annotations are not supported.<br class=""><br class="">If I'm wrong on that, and we no longer support running tests w/ old <br class="">runtimes, then yes, we could consider adding @Ignores to all the tests <br class="">which shouldn't be run, instead of using the "All" and "Suite" naming <br class="">conventions.<br class=""><br class="">--<br class=""><br class="">I've cc:'d the jbosstools-dev list because a wider audience might be <br class="">able to comment better on if it's time to move to using @ignore instead <br class="">of using restrictive patterns when running JUnits w/ Surefire in <br class="">Tycho/Maven builds.<br class=""><br class="">N<br class=""><br class="">On 01/22/2015 02:08 PM, Daniel Florian wrote:<br class=""><blockquote type="cite" class="">Guys,<br class=""><br class="">We currently have to add each JUnit test class to a test suite file called AllTests.java. If a test does not get added to this test suite it does not get run.<br class=""><br class="">I think the pom has this:<br class=""><br class="">&lt;includes&gt;<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&gt;**/AllTests.class&lt;/include&gt;<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&gt;**/*AllTests*.class&lt;/include&gt;<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&gt;**/*AllBotTests*.class&lt;/include&gt;<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&gt;**/*TestSuite*.class&lt;/include&gt;<br class="">&lt;/includes&gt;<br class=""><br class="">Could we add:<br class=""><br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&gt;**/Test*.class&lt;/include&gt;<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&gt;**/*Test.class&lt;/include&gt;<br class=""><br class="">So that we wouldn't need an AllTests.java. Other projects can keep using the test suite approach.<br class=""><br class="">With JUnit's @Ignore it is easy to stop a test from being run.<br class=""><br class="">wdyt?<br class=""><br class="">Thanks,<br class=""><br class="">Dan<br class=""><br class=""></blockquote><br class="">-- <br class="">Nick Boldt :: JBoss by Red Hat<br class="">Productization Lead :: JBoss Tools &amp; Dev Studio<br class=""><a href="http://nick.divbyzero.com" class="">http://nick.divbyzero.com</a><br class="">_______________________________________________<br class="">jbosstools-dev mailing list<br class="">jbosstools-dev@lists.jboss.org<br class="">https://lists.jboss.org/mailman/listinfo/jbosstools-dev<br class=""></div></blockquote></div><br class=""></div></body></html>