Things I Wish I Knew When I Started Testing Spring Boot Applications by Philip Riecks

preview_player
Показать описание
Getting started with Spring Boot and its auto-configuration mechanism can be a hurdle for new developers.

Once you get your first Spring Boot application up- and running, writing tests for it is the last thing you care about. You’re happy that your code does its job.

However, as soon as you try to integrate your changes, you face a pull request rejection because your lead developer reminds you that tests are missing.

Testing is an integral part of software development, and unfortunately, some teams treat this topic neglectfully. That’s bad for the future maintenance and overall health of their project. Fortunately, both Spring Test and Spring Boot offer excellent support for testing your application.

This talk will give you an overview of best practices, pitfalls, and recipes for testing Spring Boot applications. Simply put, with this talk, I’ll share the things that I wish I had known when I started testing Spring Boot applications.

PHILIP RIECKS
Philip is an independent software consultant with over seven years of professional experience. Apart from his freelance work, he's running a blog and a YouTube channel to educate Java developers about #SpringBoot, #AWS, #Testing under the slogan Testing Java Applications Made Simple. Philip is convinced that testing can be joyful once you know the how. Besides that, he's one of the authors of Stratospheric - From Zero to Production with Spring Boot and AWS.
Рекомендации по теме
Комментарии
Автор

It is a great introduction for testing with Spring and can say that as a Junior developer I have learned a trick or two! Thanks a lot for preparing this talk.

pawelk
Автор

Great introduction into Spring Boot testing. All things mentioned here are part of the official 4-day Spring Core and Spring Boot course

nicovanbelle
Автор

The description states that "This talk will give you an overview of best practices, pitfalls, and recipes for testing Spring Boot applications". But better name for this talk is "Introduction into Spring Boot Testing". So it just gives basic things from reference documentation of Spring Boot Test without any "best practices" and "pitfalls". I guess the main idea of this talk is the last slide where speaker advertises his own master-class.

Strannik
Автор

Thanks bro! Really helpful information!!! ✊✊

zenitchik
Автор

Slicing might decrease the test runtime drastically and saves potentially a lot of energy when ran often e.g. in CI

larryd
Автор

Please don't use `assertEquals`, which expects the actual result on the left side, which is weird, it's like Yoda-style code ("blue is the sky"). AssertJ is much more readable in that regard, which puts the variable/expression on the left. JUnit's built-in assertions were never meant to replace a fully-fledged assertion framework, they leave that goal to libraries.

SirWolf
Автор

Didn't know about JSONassert, thank you)

ehippo
Автор

That presentation is broken from the start - why the guy says "testing spring application"? Why not just "testing application"? Why couple your tests to the framework?

danielwilkowski