Commit Graph

17 Commits

Author SHA1 Message Date
Stéphane Nicoll aceaee89ee Polish "Replace `BaseUrl` with `LocalTestWebServer`"
See gh-47680
2025-10-21 11:08:48 +02:00
Phillip Webb 41a399c5ae Replace `BaseUrl` with `LocalTestWebServer`
Replace `BaseUrl` and `BaseUrlProvider` provider code with a more
targeted `LocalTestWebServer` class.

The `LocalTestWebServer` can be used to obtain the url of the locally
running server, or provide `UriBuilderFactory` or `UriBuilder`
instances base on it.

This commit also updates the MockMVC HTML Unit auto-configuration to
directly use `localhost` as the base URL.

Closes gh-47680
2025-10-20 17:44:51 -07:00
Stéphane Nicoll 90804c8c2b Adapt @AutoConfigureHttpGraphQlTester to new testing infrastructure
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
This commit adapts @AutoConfigureHttpGraphQlTester to rely on the
auto-configured WebTestClient and stop triggering the configuration
of MockMvc.

Closes gh-47660
2025-10-19 17:46:11 +02:00
Phillip Webb 77f207a079 Simplify BaseUrl code and cache resolved URLs
See gh-47680
2025-10-17 19:28:18 -07:00
Stéphane Nicoll 998a2fa7b4 Fix configuration of HttpGraphQlTester with a running server
This commit restores the user of HttpGraphQlTester when it is configured
against a running server. The logic that appends the graphQl path to
the HTTP url was lost while refactoring the HTTP clients infrastructure.

To work against the new API, BaseUrl has been updated to provide the
ability to append a path to its URL

Closes gh-47659
2025-10-17 16:35:06 +02:00
Andy Wilkinson e221bfdd69 Rename Jackson-specific Json… classes to Jackson…
Closes gh-47625
2025-10-16 13:53:17 +01:00
Andy Wilkinson 9eb05ebb10 Create spring-boot-resttestclient and spring-boot-webtestclient modules
Create `spring-boot-resttestclient` and `spring-boot-webtestclient`
modules to hold test client auto-configuration and `TestRestTemplate`
code.

Previous these classes were contained in `spring-boot-resetclient-test`
and `spring-boot-webclient-test` which was incorrect since the `-test`
modules should hold code need to test the given modules, not supporting
test classes.

See gh-46356

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2025-10-09 22:12:39 -07:00
Andy Wilkinson 16d8878cd8 Support embedded web environment with @AutoConfigureWebTestClient
Simplify `WebTestClient` testing support by removing the direct
context customizer in favor of using `@AutoConfigureWebTestClient`.

See gh-46356
2025-10-09 22:11:44 -07:00
Moritz Halbritter 9f1e033caf Add nullability annotations to tests in module/spring-boot-graphql-test
See gh-47263
2025-10-06 12:03:54 +02:00
Phillip Webb 8008076e04 Remove spring-boot-json-test module
Remove spring-boot-json-test module and spread code between
`spring-boot-test`, `spring-boot-test-autoconfigure` and JSON
technology modules.

See gh-46356
See gh-47322
2025-10-01 21:42:18 -07:00
Phillip Webb 4b2d358384 Refine spring-boot-test-autoconfigure dependencies
Make `spring-boot-test-autoconfigure` optionally depend on
`spring-boot-autoconfigure` so that it can be an `api` dependency
for `*-test` modules. Also relocate it to core.

See gh-47322
2025-10-01 21:41:55 -07:00
Phillip Webb 2b3a8ff647 Relocate `@TypeExcludeFilters` to spring-boot-test
Move `@TypeExcludeFilters` and supporting code from the
`spring-boot-test-autoconfigure` module to `spring-boot-test`
since it's generally applicable.

See gh-46356
See gh-47322
2025-10-01 21:39:34 -07:00
Andy Wilkinson 990644919a Make all TypeExcludeFilters package-private
Closes gh-47227
2025-09-26 11:08:53 +01:00
Andy Wilkinson 5348880b69 Modularize spring-boot-test-autoconfigure
This commit modularizes spring-boot-test-autoconfigure. It now
contains only the code that's central to test auto-configuration.
Feature-specific functionality has moved out into -test modules,
some existing and some newly created. For example, `@DataJpaTest` can
now be found in spring-boot-data-jpa-test.

Closes gh-47322
2025-09-25 13:11:35 +01:00
Andy Wilkinson d353038c58 Update Jackson support to require Jackson 3
Closes gh-45535
2025-09-02 11:37:09 +01:00
Moritz Halbritter 910a8a4fe5 Add nullability annotations to module/spring-boot-graphql-test
See gh-46587
2025-08-01 09:16:10 +02:00
Phillip Webb decc32dde3 Restructure project directories to better fit Gradle
Closes gh-46358
2025-07-10 17:54:08 -07:00