Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.11
-
Fix Version/s: 2.12
-
Component/s: Junit 4.x support, TestNG support
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
This is an alternative to SUREFIRE-808.
Instead of having hard-coded filtering structure combining two lists.
an expression could be parsed and evaluated for each test.
Each test would be "tagged" using
@Categories({ MyCateg1.class, MyCateg2.class, ... })
Surefire's `group` config param would be an expression like:
<groups>( Ejb AND (CommonCriteria OR Security) ) AND NOT( Clustering )<groups>
Presence of a category of given name would be evaluated as true, absence of it as false.
Interface inheritance would be taken into account.
This mechanism would provide unlimited possibilities of grouping tests, and would be very beneficial for huge testuites counting thousands of tests.
Issue Links
- is related to
-
SUREFIRE-808
Selectable "grouping mode" for test groups - UNION or INTERSECTION.
-
For parsing and evaluation, JEXL library could be used - http://commons.apache.org/jexl/ .
Other approach is to use ANTLR grammar, parse the expression and code the evaluation. Example of grammar is attached.
Also, there's older 2.x release of JEP library which was under GPL: http://sourceforge.net/projects/jep/