{"issue":{"created_at":"2011-11-29T16:22:34Z","state":"open","updated_at":"2011-12-09T17:58:07Z","comments":18,"user":{"gravatar_id":"ddc41dadd5d79e396783e82ba8e862f6","id":244946,"url":"https://api.github.com/users/tdiesler","avatar_url":"https://secure.gravatar.com/avatar/ddc41dadd5d79e396783e82ba8e862f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"tdiesler"},"body":"","assignee":null,"id":2386775,"pull_request":{"patch_url":"https://github.com/jbossas/jboss-as/pull/751.patch","html_url":"https://github.com/jbossas/jboss-as/pull/751","diff_url":"https://github.com/jbossas/jboss-as/pull/751.diff"},"labels":[],"number":751,"title":"[AS7-2834] No config XSLT transform for basic integration tests","html_url":"https://github.com/jbossas/jboss-as/issues/751","closed_at":null,"url":"https://api.github.com/repos/jbossas/jboss-as/issues/751","milestone":null},"action":"created","comment":{"created_at":"2011-12-09T17:58:07Z","updated_at":"2011-12-09T17:58:07Z","user":{"gravatar_id":"ddc41dadd5d79e396783e82ba8e862f6","id":244946,"url":"https://api.github.com/users/tdiesler","avatar_url":"https://secure.gravatar.com/avatar/ddc41dadd5d79e396783e82ba8e862f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"tdiesler"},"body":"Hi all,\n\nJust a quick summary what's the issue: There's a need to define test\ngroups (beyond the smoke/basic/... level) which are defined by different\nconcerns, e.g.:\n * Functionality areas - EJB, JMS, ...\n * Tests (not) able to run under certain conditions - like, some won't\nrun with security manager\n * Only some tests are run for Common Criteria verification\n\nIt's not viable to keep splitting the Maven modules to submodules each\ntime we need to define a new group.  (Solution B - \"Megalomanic\" - from\nmy previous post on this topic).\nSo I've been looking a bit for some wiser solution.\n\n\nPeter suggested that we could have string tags, passed to the tests in\nsome ways;\n   The tests would use JUnit's assume*() methods to skip the test if\nsome tag is (not) present.\n   By default, a test would run - since there would be no assume*()\ncalls.\n\n\nI discussed the @Category with Aslak (Solution C - \"Optimistic\nengineer's\").\nHere's the outcome:\n\n1)  JUnit's  @Category supports multiple   @Category( { SlowTests.class,\nFastTests.class })\n     Here's the runner for it:\nhttp://kentbeck.github.com/junit/javadoc/latest/org/junit/experimental/categories/Categories.html\n\n2) Surefire 2.11 supports that with groups=... and excludedGroups=... - see \n   http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#groups\n\n3) Unfortunatelly, by default, it runs  a _union_ of included test;\n   What we need is an _intersection_ .\n\n   In other words ( from Surefire's docs: http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#groups )\n      \"Only classes/methods/etc decorated with one of the groups specified here will be included in test run, if specified.\"\n   We need:\n      \"Only classes/methods/etc decorated with all of the groups specified here will be included in test run, if specified.\"\n\n   Example:  -Dgroups=\"EJB,CC\" would run tests tagged EJB + CC + Security, but not EJB + Cluster.\n\n4) Fortunatelly, adding a param to make it give intersection should be easy - we would introduce\n     groupingMode=union|intersection\n     excludeGroupingMode=union|intersection\n   in https://github.com/apache/maven-surefire/blob/trunk/surefire-providers/common-junit48/src/main/java/org/apache/maven/surefire/common/junit48/FilterFactory.java#L115\n\nPros:\n  * Type-checked - no typos.\n  * Interfaces hierarchy can be used to create category facets (see http://en.wikipedia.org/wiki/Faceted_classification ).\n\nLet me know if you like this approach.\nThere's still time to have it ready for EAP.\n\nOndra","id":3083191,"url":"https://api.github.com/repos/jbossas/jboss-as/issues/comments/3083191"}}