001 /*
002 * $Id: IntegrationTest.java,v 1.3 2010/04/22 18:27:19 oboehm Exp $
003 *
004 * Copyright (c) 2010 by Oliver Boehm
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 *
018 * (c)reated 05.03.2010 by oliver (ob@oasd.de)
019 */
020
021 package patterntesting.runtime.annotation;
022
023 import java.lang.annotation.*;
024
025 /**
026 * This annotation allows you to mark classes which are not really a unit test
027 * but a integration test. By default this classes are not executed by a normal
028 * test run with JUnit. Only if you set the system property
029 * {@link patterntesting.runtime.util.Environment#INTEGRATION_TEST} these
030 * tests will executed.
031 *
032 * You can use this annotation if
033 * <ul>
034 * <li>your JUnit test takes too long because it is a integration test,</li>
035 * <li>you must be online for a JUnit test,</li>
036 * <li>your JUnit test needs a database access,</li>
037 * <li>your JUnit tests is to slow,</li>
038 * <li>other good reason why the test should not be executed each time.</li>
039 * </ul>
040 *
041 * @author oliver
042 * @since 1.0 (05.03.2010)
043 */
044 @Documented
045 @Target({ElementType.METHOD, ElementType.TYPE})
046 @Retention(RetentionPolicy.RUNTIME)
047 public @interface IntegrationTest {
048
049 /**
050 * You can give a reason why this test is an integration test or should
051 * be skipped, e.g. "needs online access". This reason is printed to the
052 * log.
053 */
054 String value() default "this is marked as @IntegrationTest";
055
056 }
057