[ 
https://issues.apache.org/jira/browse/SUREFIRE-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260349#comment-15260349
 ] 

Chris Pennello commented on SUREFIRE-1241:
------------------------------------------

bq. Feel free to override the default settings.
For sure, that's what we've done.

bq. but in the reality test-classes contains more classes than your source code 
and therefore we have to distinguish between classes. That's the reason for the 
pattern and it is then a naming convention of the test class. For instance the 
integration tests have different pattern *IT and they run in different phase. 
Therefore they have to be distinguished in order to run the class just once - 
unit/IT.
That's a great point!  And admittedly something I'd not considered in this case.

bq. That's your opinion to run everything,
Right, I understand that sentiment.  But it isn't just _my_ opinion\-\-it's 
also the design of the authors of Eclipse and IntelliJ.  Why would they not 
likewise distinguish between unit and integration, for example?  Maybe their 
default configuration just simply isn't as sophisticated as the Surefire setup?

> include everything and exclude nothing
> --------------------------------------
>
>                 Key: SUREFIRE-1241
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1241
>             Project: Maven Surefire
>          Issue Type: Improvement
>            Reporter: Chris Pennello
>
> I would like to suggest we alter the default values for {{<includes>}} and 
> {{<excludes>}}.
> The current defaults for the includes are
> {noformat}
> <include>**/Test*.java</include>
> <include>**/*Test.java</include>
> <include>**/*TestCase.java</include>
> {noformat}
> and the current default for the excludes is
> {noformat}
> <exclude>**/*$*</exclude>
> {noformat}
> This causes Surefire to behave differently when finding tests from several 
> other independent implementations--Eclipse and IntelliJ.  Both of these IDEs 
> find all {{@Test}}-annotated methods.  Thus, when testing with the IDEs, you 
> run many more of your tests than Maven does using Surefire (presuming that 
> you choose names or class nesting that are subject to the default rules).
> I think it would be very valuable for Surefire to behave consistently with 
> respect to these two pretty popular IDEs.
> I am curious about the origin of the defaults for these rules.  Maybe there 
> are some great reasons to limit the inclusions and have non-empty exclusions 
> by default?  But if so, then why don't the IDEs do the same?  What are the 
> risks?
> Absent any such reasoning, it seems to me like it would be most helpful to 
> the user base to make the tests we discover as inclusive as possible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to