Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jesperancinha/jeorg-spring-test-drives
This project is intended as a study tool for the Spring Framework. This includes Spring and Spring Boot. It includes Java and Kotlin implementations. It is also a source of Mockk, Kotest and Jupiter 5 combined examples.
https://github.com/jesperancinha/jeorg-spring-test-drives
java java11 java11-spring-boot java19 java8 jdk19 kotest kotlin kotlin-library mockk modularity pivotal spring spring-boot spring-data spring-mvc spring-security spring5
Last synced: about 1 month ago
JSON representation
This project is intended as a study tool for the Spring Framework. This includes Spring and Spring Boot. It includes Java and Kotlin implementations. It is also a source of Mockk, Kotest and Jupiter 5 combined examples.
- Host: GitHub
- URL: https://github.com/jesperancinha/jeorg-spring-test-drives
- Owner: jesperancinha
- License: apache-2.0
- Created: 2019-10-30T17:36:28.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T03:08:13.000Z (9 months ago)
- Last Synced: 2024-04-14T11:41:42.849Z (9 months ago)
- Topics: java, java11, java11-spring-boot, java19, java8, jdk19, kotest, kotlin, kotlin-library, mockk, modularity, pivotal, spring, spring-boot, spring-data, spring-mvc, spring-security, spring5
- Language: Java
- Homepage: http://joaofilipesabinoesperancinha.nl/
- Size: 6.29 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Test Drives
---
[![Generic badge](https://img.shields.io/static/v1.svg?label=GitHub&message=Spring%20Test%20Drives&color=informational)](https://github.com/jesperancinha/jeorg-spring-test-drives)
[![GitHub License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)[![CircleCI](https://circleci.com/gh/jesperancinha/jeorg-spring-test-drives.svg?style=svg)](https://circleci.com/gh/jesperancinha/jeorg-spring-test-drives)
[![Build status](https://ci.appveyor.com/api/projects/status/wksvhmqaq0sd8505?svg=true)](https://ci.appveyor.com/project/jesperancinha/jeorg-spring-test-drives)
[![jeorg-spring-test-drives](https://github.com/jesperancinha/jeorg-spring-test-drives/actions/workflows/jeorg-spring-test-drives.yml/badge.svg)](https://github.com/jesperancinha/jeorg-spring-test-drives/actions/workflows/jeorg-spring-test-drives.yml)[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9d14f60a58bd456fb1084860b5a46871)](https://www.codacy.com/gh/jesperancinha/jeorg-spring-test-drives/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jesperancinha/jeorg-spring-test-drives&utm_campaign=Badge_Grade)
[![codebeat badge](https://codebeat.co/badges/b9097b8c-40f8-48bf-beb3-2007803b4bad)](https://codebeat.co/projects/github-com-jesperancinha-jeorg-spring-test-drives-master)
[![Known Vulnerabilities](https://snyk.io/test/github/jesperancinha/jeorg-spring-test-drives/badge.svg)](https://snyk.io/test/github/jesperancinha/jeorg-spring-test-drives)[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/9d14f60a58bd456fb1084860b5a46871)](https://www.codacy.com/gh/jesperancinha/jeorg-spring-test-drives/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jesperancinha/jeorg-spring-test-drives&utm_campaign=Badge_Coverage)
[![Coverage Status](https://coveralls.io/repos/github/jesperancinha/jeorg-spring-test-drives/badge.svg?branch=master)](https://coveralls.io/github/jesperancinha/jeorg-spring-test-drives?branch=master)
[![codecov](https://codecov.io/gh/jesperancinha/jeorg-spring-test-drives/branch/master/graph/badge.svg?token=08TJV16VKG)](https://codecov.io/gh/jesperancinha/jeorg-spring-test-drives)[![GitHub language count](https://img.shields.io/github/languages/count/jesperancinha/jeorg-spring-test-drives.svg)](#)
[![GitHub top language](https://img.shields.io/github/languages/top/jesperancinha/jeorg-spring-test-drives.svg)](#)
[![GitHub top language](https://img.shields.io/github/languages/code-size/jesperancinha/jeorg-spring-test-drives.svg)](#)## Technologies used
Please check the [TechStack.md](TechStack.md) file for details.
## Description
SPRING study project.
The purpose of this project is to keep up with the development of the Spring Framework
See [Log Book](./LogBook.md) for further details.
#### Stable releases
- [0.0.0](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/0.0.0) - [d8700ab7d597fb825cbfc1fca30c2153ef5141ea](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/0.0.0) - Spring boot 2.7.0 / JDK 11
- [1.0.0](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/1.0.0) - [395d79e218595e57365c7ad9723c2aa20ad77881](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/1.0.0) - Spring boot 2.7.5 / JDK 17
- [2.0.0](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/2.0.0) - [179ec86df1033b9d551621173751bd60590da775](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/2.0.0) - Spring boot 3.0.0 / JDK 17
- [3.0.0](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/3.0.0) - [49d0d3863ff7079c473b2a8bfe285c7735a71f9c](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/3.0.0) - Spring boot 3.0.2 / JDK 19## Contents
1. [Spring](./jeorg-spring-5) - Test drives for the Spring 5 Frawework (Bare minimum focus given to Spring Boot)
2. [Spring Kotlin](./jeorg-spring-kotlin-5) - Test drives for the Spring 5 Frawework in Kotlin (Bare minimum focus given to Spring Boot)## Specs
1. Spring: [org.springframework](https://mvnrepository.com/artifact/org.springframework/) - 5.2.15.RELEASE
2. Spring Boot: [org.springframework.boot/spring-boot-starter-parent](https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent) - 2.3.11.RELEASE## Build
Note that if you want to build this project from the root, you need to use one of the JDK 11 or upper versions.
See [Hints&Tricks](https://github.com/jesperancinha/project-signer/blob/master/project-signer-templates/Hints%26Tricks.md)
document for more details
```bash
mvn clean install -Dconsolerizer.show=false
```## Install JDK using [SDK-MAN](https://sdkman.io/)
```bash
. ./sdk19.sh
```## Detect Non-Running Tests
```bash
mvn clean install | egrep "Tests run|----"
```
## Sequence Diagram```mermaid
sequenceDiagram
participant USER
participant SPRING
participant Spring Professional
rect rgb(1,130,25)
USER->>SPRING: User studies spring
SPRING->>Spring Professional: User becomes
loop Keep updated
Spring Professional->>SPRING: User studies again
end
end
```Note: You need a Mermaid plugin extension
i.e. [mermaid-plugin](https://chrome.google.com/webstore/detail/mermaid-diagrams/phfcghedmopjadpojhmmaffjmfiakfil/related)
## Tech-stack Cloud
`@Transational timeout`, `TestRestTemplate`, `HealthIndicator`, `actuator`, `Embedded`, `JPA`, `Big Data`
## Running unit and integration tests
The examples presented in this repo need to use a docker-engine/docker-machine in order to run.
This is because they make use of the [testcontainers](https://www.testcontainers.org/) project.
I tested this using Docker Desktop for mac and on an ubuntu-unity machine. As long as the docker-machine/docker-engine is running, the maven build shoud also work.
Using embedded alternatives revealed to be quite cumbersome, inefficient and slow.
For more info on docker desktop please check their [website](https://www.docker.com/).
For learning how to install docker in ubuntu please check their [website](https://docs.docker.com/engine/install/ubuntu/).
When this is ready, just run:
```shell
make build
```or
```shell
mvn clean install
```## Resources
### Online
- [How to test the REST Clients of your Spring Boot Application with @RestClientTest](https://jschmitz.dev/posts/how_to_test_the_rest_clients_of_your_spring_boot_application_with_restclienttest/)
- [Introduction to OpenRewrite](https://docs.openrewrite.org/)### Books
- Cosmina, I. (11th December 2019). Pivotal Certified Professional Core Spring 5 Developer Exam: A Study Guide Using Spring Framework 5. (Second Edition). Apress
- Sharma, R. (September 2018). Hands-On Reactive Programming with Reactor. (First Edition). Packt
- Cosmina, I. Harrop, R. Schaefer, C. Ho, C. (October 2017). Pro Spring 5 An In-Depth Guide to the Spring Framework and Its Tools. (Fifth Edition). Apress
- Winch, R. Mularien, P. (December 2012). Spring Security 3.1. (Second Edition). Packt Publishing
- Kurniawan, B. Deck, P. (January 2015). Servlet, JSP & Spring MVC. (First Edition). Brainy Software
- Long, J. (2020). Reactive Spring. (First Edition). Josh Long### Online
- [What’s new in Spring Framework 5](https://developer.ibm.com/languages/java/tutorials/j-whats-new-in-spring-framework-5-theedom)
- [Spring Framework Overview](https://docs.spring.io/spring-framework/docs/5.1.18.RELEASE/spring-framework-reference/overview.html)
- [Spring Framework Documentation - Current Version](https://docs.spring.io/spring-framework/docs/current/reference/html/index.html)## About me
[![GitHub followers](https://img.shields.io/github/followers/jesperancinha.svg?label=Jesperancinha&style=for-the-badge&logo=github&color=grey "GitHub")](https://github.com/jesperancinha)