/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.

Primary LanguageJavaApache License 2.0Apache-2.0

Spring Test Drives


Generic badge GitHub License

CircleCI Build status jeorg-spring-test-drives

Codacy Badge codebeat badge Known Vulnerabilities

Codacy Badge Coverage Status codecov

GitHub language count GitHub top language GitHub top language

Technologies used

Please check the 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 for further details.

Stable releases

Contents

  1. Spring - Test drives for the Spring 5 Frawework (Bare minimum focus given to Spring Boot)
  2. Spring Kotlin - Test drives for the Spring 5 Frawework in Kotlin (Bare minimum focus given to Spring Boot)

Specs

  1. Spring: org.springframework - 5.2.15.RELEASE
  2. Spring Boot: 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 document for more details

mvn clean install -Dconsolerizer.show=false

Install JDK using SDK-MAN

. ./sdk19.sh

Detect Non-Running Tests

mvn clean install | egrep "Tests run|----"

Sequence Diagram

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
Loading

Note: You need a Mermaid plugin extension

i.e. mermaid-plugin

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 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.

For learning how to install docker in ubuntu please check their website.

When this is ready, just run:

make build

or

mvn clean install

Resources

Online

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

About me

GitHub followers