patterntesting.runtime.annotation.IntegrationTest Maven / Gradle / Ivy
/*
* $Id: IntegrationTest.java,v 1.3 2010/04/22 18:27:19 oboehm Exp $
*
* Copyright (c) 2010 by Oliver Boehm
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* (c)reated 05.03.2010 by oliver ([email protected])
*/
package patterntesting.runtime.annotation;
import java.lang.annotation.*;
/**
* This annotation allows you to mark classes which are not really a unit test
* but a integration test. By default this classes are not executed by a normal
* test run with JUnit. Only if you set the system property
* {@link patterntesting.runtime.util.Environment#INTEGRATION_TEST} these
* tests will executed.
*
* You can use this annotation if
*
* - your JUnit test takes too long because it is a integration test,
* - you must be online for a JUnit test,
* - your JUnit test needs a database access,
* - your JUnit tests is to slow,
* - other good reason why the test should not be executed each time.
*
*
* @author oliver
* @since 1.0 (05.03.2010)
*/
@Documented
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface IntegrationTest {
/**
* You can give a reason why this test is an integration test or should
* be skipped, e.g. "needs online access". This reason is printed to the
* log.
*/
String value() default "this is marked as @IntegrationTest";
}