View Javadoc
1   /*
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.kuali.rice.test.runners;
18  
19  import java.lang.annotation.Retention;
20  import java.lang.annotation.Target;
21  
22  import static java.lang.annotation.ElementType.TYPE;
23  import static java.lang.annotation.RetentionPolicy.RUNTIME;
24  
25  /**
26   * Defines a test class which should be loaded and run at the start of a suite of tests.
27   *
28   * <p>This annotation should be applied to a class which uses the {@link LoadTimeWeavableTestRunner} which will load
29   * and execute the specified bootstrap test.</p>
30   *
31   * <p>Usually, this is used for one-time initialization for the test suite. It also helps to get around issues of eager
32   * classloading of JPA entities before their ClassFileTransformers can be registered for load-time weaving.</p>
33   *
34   * <p>The test class referenced must have at least one {@link org.junit.Test}</p> method even if it doesn't actually
35   * do anything.</p>
36   */
37  @Target(TYPE)
38  @Retention(RUNTIME)
39  public @interface BootstrapTest {
40  
41      Class<?> value();
42  
43  }