Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * JBoss, Home of Professional Open Source.
  * Copyright 2012, Red Hat, Inc., and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
  * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site:

Contains interfaces to be used as test tags for additional test grouping, using org.junit.experimental.categories.Category(...). These tags do not define the main categories - those are still denoted by java packages. These groups just help to define certain tests with cross-cutting concerns like security and management. Before you define a new group, please discuss with the community. This feature needs JUnit 4.7+, and Surefire/Failsafe 2.12.4+ Examples of categories: interface AllTests; interface ATests extends AllTests; interface BTests extends AllTests; interface AaTests extends ATests;

ATests.class) public void ATest();
AaTests.class) public void AaTest();
BTests.class) public void BTest(); As is apparent, interfaces inheritance can be leveraged to create a hierarchy. A test can belong into multiple categories:
{Foo.class, Bar.class}) The tagged tests can be run in groups using Surefire's <includedGroups> and <excludedGroups> options in pom.xml, or and -Dtest.exgroup=... at command line. These parameters support expressions with operators: && || ! (&amp;&amp; in pom.xml) && !
New to GrepCode? Check out our FAQ X