- 24 Mar, 2016 34 commits
-
-
Stephane Nicoll authored
-
Stephane Nicoll authored
This commit documents the new `InfoContributor` infrastructure. Closes gh-2559
-
Andy Wilkinson authored
The commit adds a new BuildInfo task that can be used to generate a build.properties file, intended for inclusion in the Actuator's info endpoint. A default instance of the task can be configure using the plugin's DSL: springBoot { buildInfo() } Additional properties can also be configured using the DSL: springBoot { buildInfo { additionalProperties = [ 'foo': 'bar' ] } } When configured via the DSL, the Java plugin's classes task is configured to depend on the build info task. Alternatively, if more control is required, the task can be declared and configured manually: task buildInfo(type: org.springframework.boot.gradle.buildinfo.BuildInfo) { additionalProperties = [ 'foo': 'bar' ] } classes { dependsOn buildInfo } See gh-2559
-
Phillip Webb authored
-
Phillip Webb authored
Closes gh-4901
-
Phillip Webb authored
Add a sample application that demonstrates recently added testing features. See gh-4901
-
Phillip Webb authored
Add @DataJpaTest and @AutoConfigureTestDatabase annotations to allow testing of an application "slice" that only deals JPA. See gh-4901
-
Phillip Webb authored
Add @WebMvcTest and @AutoConfigureMockMvc annotations to allow testing of an application "slice" that only deals with Spring MVC. See gh-4901
-
Phillip Webb authored
Add @JsonTest and @AutoConfigureJsonTesters annotations to allow testing of an application "slice" that only deals with JSON marshalling. See gh-4901
-
Phillip Webb authored
Provide a way for auto-configuration tests to easily filter scanned components. See gh-4901
-
Phillip Webb authored
Add @PropertyMapping annotation which can be used to mark annotation attributes that should contribute Environment properties. Provides a quick way for tests to change auto-configuration behavior in a structured way. Fixes gh-4901
-
Phillip Webb authored
Add a TestExecutionListener to print the auto-configuration report when a test cannot load. See gh-4901
-
Phillip Webb authored
Add a new test module to deal with auto-configuration in tests. See gh-4901
-
Phillip Webb authored
Provide a way for full auto-configuration to be disabled programmatically. Primarily added to allow special test annotations to take over partial auto-configuration but still load @SpringBootApplication classes. See gh-4901
-
Phillip Webb authored
Update `@ImportAutoConfiguration` so that it can be used as a meta-annotation. Also relocate it from the `test` package. Fixes gh-5473
-
Phillip Webb authored
Remove the need for a nested @Configuration class when writing a test that need to @Import configuration. Primarily added to allow @ImportAutoConfiguration to be used directly on test classes. Fixes gh-5473
-
Phillip Webb authored
Add a ContextCustomizerFactory to provide TestRestTemplate as a bean for tests annotated with WebIntegrationTests. Additionally provide support for automatically expanding URLs of the form `/example` to `http://localhost:${local.server.port}/example`. Fixes gh-5227
-
Phillip Webb authored
Provide variants of `WebClient` and `WebConnectionHtmlUnitDriver` that automatically resolve relative URLs to "localhost:${local.server.port}". Fixes gh-5472
-
Phillip Webb authored
Add Jackson, Gson and Basic String helper classes that allow AssertJ assertions to be used to test JSON. Fixes gh-5471
-
Phillip Webb authored
Add a `@MockBean` annotation which can be used to setup and inject mocks into an application context. The annotation can be used on test classes, test fields, configuration classes or configuration fields. When used on a field the annotation also acts as an injection point. Fixes gh-5042
-
Phillip Webb authored
Update internal tests to drop annotations that can now be inferred. Fixes gh-5470
-
Phillip Webb authored
Update @IntegrationTest to use @BootstrapWith rather than an explicitly defined set of test execution listeners. Also introduce a new @SpringApplicationTest annotation that is similar to @SpringApplicationConfiguration but a bootstrapper. Fixes gh-5230
-
Phillip Webb authored
Allow detection of `@SpringBootConfiguration` classes for both standard spring tests and bootstrap (@IntegrationTest @WebIntegrationTest) based tests. Closes gh-5295
-
Phillip Webb authored
Add TestTypeExcludeFilter which will automatically attempt to exclude test only configurations. All `@Configuration` annotated inner-classes of tests are automatically excluded. The `@TestConfiguration` annotation can be used to explicitly if a configuration needs explicit exclusion. See gh-5295 See gh-4901
-
Phillip Webb authored
Add a new TypeFilter specifically for excluding candidate components. The filter is applied to `@SpringBootApplication` and allows tests to dynamically contribute exclude filters so that specific classes of component can be excluded. See gh-5295 See gh-4901
-
Phillip Webb authored
Add a new @SpringBootConfiguration annotation that can be used to indicate the primary application configuration. The new annotation is primarily indented to allow test automatically code to find the main configuration class. See gh-5295
-
Phillip Webb authored
Update SpringApplicationContextLoader to call ContextCustomizers in the same way as other classes in `spring-test`. Fixes gh-5294
-
Phillip Webb authored
Replace all existing SpringJUnit4ClassRunner references with the new SpringRunner alias. Fixes gh-5292
-
Phillip Webb authored
Update the existing tests to use the relocated `spring-boot-test` classes. Restructuring was achieved using the following command: find . -type f -name '*.java' -exec sed -i '' \ -e s/org.springframework.boot.test.ConfigFileApplicationContextInitializer/\ org.springframework.boot.test.context.ConfigFileApplicationContextInitializer/g \ -e s/org.springframework.boot.test.EnvironmentTestUtils/\ org.springframework.boot.test.util.EnvironmentTestUtils/g \ -e s/org.springframework.boot.test.IntegrationTest/\ org.springframework.boot.test.context.IntegrationTest/g \ -e s/org.springframework.boot.test.IntegrationTestPropertiesListener/\ org.springframework.boot.test.context.IntegrationTestPropertiesListener/g \ -e s/org.springframework.boot.test.OutputCapture/\ org.springframework.boot.test.rule.OutputCapture/g \ -e s/org.springframework.boot.test.SpringApplicationConfiguration/\ org.springframework.boot.test.context.SpringApplicationConfiguration/g \ -e s/org.springframework.boot.test.SpringApplicationContextLoader/\ org.springframework.boot.test.context.SpringApplicationContextLoader/g \ -e s/org.springframework.boot.test.SpringBootMockServletContext/\ org.springframework.boot.test.mock.web.SpringBootMockServletContext/g \ -e s/org.springframework.boot.test.TestRestTemplate/\ org.springframework.boot.test.web.client.TestRestTemplate/g \ -e s/org.springframework.boot.test.WebIntegrationTest/\ org.springframework.boot.test.context.web.WebIntegrationTest/g {} \; See gh-5293
-
Phillip Webb authored
Create a new package structure for `spring-boot-test` and deprecate existing classes. Fixes gh-5293
-
Phillip Webb authored
Update spring-boot-starter-test to include JSONassert and JsonPath. Both are generally useful libraries when writing MVC tests. Fixes gh-5469
-
Phillip Webb authored
Update `@EnableTransactionManagement` so that `proxyTargetClass` is set to true. This ensures that @Transactional beans that aren't interface based can still be proxied. Fixes gh-5423
-
Phillip Webb authored
Call afterPropertiesSet on the delegate `ResourceHttpRequestHandler` to prevent an NPE. This change is required following SPR-13834.
-
Phillip Webb authored
-
- 23 Mar, 2016 2 commits
-
-
Stephane Nicoll authored
-
Andy Wilkinson authored
This is a follow-on from the work done in 50099337. Now that SPR-14015 has been fixed, constructor injection can also be used for parameterised dependencies, including optional dependencies that are injected via an ObjectProvider. Closes gh-5306
-
- 22 Mar, 2016 4 commits
-
-
Stephane Nicoll authored
Spring Boot does not support Thymeleaf 3 yet. This commit prevents the auto-configuration to activate if Thymeleaf 3 is available on the classpath. Closes gh-5371
-
Stephane Nicoll authored
-
Phillip Webb authored
-
Phillip Webb authored
-