Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mp911de/testing-with-spring-boot
Repository that explains how to test applications with Spring Boot
https://github.com/mp911de/testing-with-spring-boot
java spring-boot testing
Last synced: 2 months ago
JSON representation
Repository that explains how to test applications with Spring Boot
- Host: GitHub
- URL: https://github.com/mp911de/testing-with-spring-boot
- Owner: mp911de
- Created: 2016-08-20T14:34:09.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2020-06-13T10:15:56.000Z (over 4 years ago)
- Last Synced: 2024-11-02T02:33:38.444Z (2 months ago)
- Topics: java, spring-boot, testing
- Language: Java
- Homepage:
- Size: 80.1 KB
- Stars: 52
- Watchers: 7
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Testing with Spring Boot 1.5
This repository contains code to demonstrate the use of the new Spring Boot 1.5 testing support.
In particular it shows the usage of:
* AssertJ
* `@LocalServerPort` through [TestingWithSpringBootApplicationTests.java](src/test/java/com/example/TestingWithSpringBootApplicationTests.java)
* `@RestClientTest` through [DealerServiceIntegrationTests.java](src/test/java/com/example/external/dealer/DealerServiceIntegrationTests.java)
* `@JsonTest` through [TransactionJsonTests.java](src/test/java/com/example/external/dealer/TransactionJsonTests.java)
* `@DataJpaTest` through [CarRepositoryIntegrationTests.java](src/test/java/com/example/external/data/CarRepositoryIntegrationTests.java)
* `@MockBean` and `@WebMvcTest` through [CarControllerTests.java](src/test/java/com/example/web/CarControllerTests.java)
* `@WebMvcTest` with Selenium and HtmlUnit through [CarControllerSeleniumTests.java](src/test/java/com/example/web/CarControllerSeleniumTests.java) and [CarControllerHtmlUnitTests.java](src/test/java/com/example/web/CarControllerHtmlUnitTests.java)
* `TestRestTemplate` through [CarControllerRestTests.java](src/test/java/com/example/web/CarControllerSeleniumTests.java)
* `@Rule OutputCapture` through through [OutputCapturingTests.java](src/test/java/com/example/OutputCapturingTests.java)