From 5e61e33c6627edd19742906f84c3ca8aeadcda90 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 1 Aug 2019 18:49:55 +0200 Subject: [PATCH] Introduce SpringTestContextFrameworkTestSuite as a convenience in IDE --- .../SpringTestContextFrameworkTestSuite.java | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 spring-test/src/test/java/org/springframework/test/context/SpringTestContextFrameworkTestSuite.java diff --git a/spring-test/src/test/java/org/springframework/test/context/SpringTestContextFrameworkTestSuite.java b/spring-test/src/test/java/org/springframework/test/context/SpringTestContextFrameworkTestSuite.java new file mode 100644 index 0000000000..d1532dfcff --- /dev/null +++ b/spring-test/src/test/java/org/springframework/test/context/SpringTestContextFrameworkTestSuite.java @@ -0,0 +1,51 @@ +/* + * Copyright 2002-2019 the original author or authors. + * + * 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 + * + * https://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 or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.test.context; + +import org.junit.platform.runner.JUnitPlatform; +import org.junit.platform.suite.api.ExcludeTags; +import org.junit.platform.suite.api.IncludeClassNamePatterns; +import org.junit.platform.suite.api.SelectPackages; +import org.junit.platform.suite.api.UseTechnicalNames; +import org.junit.runner.RunWith; + +/** + * JUnit Platform based test suite for tests that involve the Spring TestContext + * Framework. + * + *

This suite is only intended to be used manually within an IDE. + * + *

Logging Configuration

+ * + *

In order for our log4j2 configuration to be used in an IDE, you must + * set the following system property before running any tests — for + * example, in Run Configurations in Eclipse. + * + *

+ * -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
+ * 
+ * + * @author Sam Brannen + * @since 5.2 + */ +@RunWith(JUnitPlatform.class) +@SelectPackages("org.springframework.test.context") +@IncludeClassNamePatterns(".*Tests?$") +@ExcludeTags("failing-test-case") +@UseTechnicalNames +public class SpringTestContextFrameworkTestSuite { +}