Testing Spring Boot Applications - Phil Webb

  Рет қаралды 34,691

SpringDeveloper

SpringDeveloper

7 жыл бұрын

Recorded at SpringOne Platform 2016.
In this talk we'll cover the host of new features that have been added to Spring Boot 1.4 to help with testing. We'll discuss how to unit test your code, how (and when) to involve Spring in your tests, and talk about the various tools and libraries that you should be using. Taking a simple application, we're going to add: - Unit tests for basic components - Integration Tests for JPA entities and queries - Tests for JSON marshalling and unmarshalling - Tests for Spring MVC controllers - Tests for remote RestTemplate calls (using mocking) - End-to-end integration tests (hitting a real HTTP endpoint) Well also look a little bit at the internals of Spring's testing support and pick apart how the magic actually works.

Пікірлер: 15
@go_lang_thang
@go_lang_thang 3 ай бұрын
2024, This video still relevant !!! Thanks a lot !!!
@geraldine-211
@geraldine-211 6 жыл бұрын
57:34 he shows how to get to the content order of what he covers, but here are some loose timestamps of talk points 20:00 JUnit 21:00 naming conventions 26:00 domain tests 27:00 Data JPA tests 30:00 testing handcrafted DB queries 43:00 service tests 51:00 @mockbean 52:15 controller tests @mockmvc
@LorenzoBettini
@LorenzoBettini 6 жыл бұрын
Very well-done presentation that gets you started in testing Spring Boot apps!
@TheRealFallenDemon
@TheRealFallenDemon 7 жыл бұрын
I ported all my unit tests to Cucumber for readability purposes last night (single person project, it's nice that I can look at feature files and see what my components were meant to do at a glance). I think I need to libratize some of my code because the security convenience annotations just flat out didn't work. Still having some trouble with post methods as well, but still muddling through why that is, tried turning off CSRF and I was still having issues.
@gauravdighe4117
@gauravdighe4117 5 жыл бұрын
I have written a service layer which will throw UserExistsException, My RestController will call that service, but how to propogate the exception to Controller and then to ResponseEntity. I need to know the Best Practise (Coding Standards) for such things. Please assist.
@ivanmile78
@ivanmile78 6 жыл бұрын
OMG, 0:54 latest commit 666ae66! That's what I call devil's commit :)
@artemaz
@artemaz 7 жыл бұрын
Good Talk on Testing :-). However, there are other scenarios that weren't covered in this. Especially the scenario where you have an application that uses a third party OAuth2 authentication. We saw the use of `MockMvc` which is fine when you want to access a resource like `/home`. However, with a web application that uses OAuth2, the test won't be able to access that resource as easily. And this would have been good to see.
@KAUSHIKAKALI
@KAUSHIKAKALI 6 жыл бұрын
Here is a good article for testing with OAuth2 www.kaushikbaruah.com/posts/mock-authorization-server-spring-boot-integration-test/
@motolola
@motolola 5 жыл бұрын
@@KAUSHIKAKALI I read the article, and followed the steps to the letter, but keep getting errors like ... org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authorizationTestServer
@michaelwijayagames
@michaelwijayagames 6 жыл бұрын
How could your dependencies injection work without @Autowired? private UserVehicleService service; 20:29
@tetsuya8736
@tetsuya8736 5 жыл бұрын
Link to github repo github.com/philwebb/testing-spring-boot-applications
@vasiliydorofeev1355
@vasiliydorofeev1355 5 жыл бұрын
Please add github link
@tetsuya8736
@tetsuya8736 5 жыл бұрын
github.com/philwebb/testing-spring-boot-applications
Bootiful Testing
1:18:16
SpringDeveloper
Рет қаралды 28 М.
Advanced Spring Data REST - Oliver Gierke
1:03:20
SpringDeveloper
Рет қаралды 15 М.
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 76 МЛН
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 1,6 МЛН
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 11 МЛН
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
40 Tips & Tricks for Spring in IntelliJ IDEA - Stephane Nicoll, Yann Cebron
1:01:22
Testing with Spring Framework 4.3, JUnit 5, and Beyond
1:10:25
SpringDeveloper
Рет қаралды 10 М.
10 Ways to Get Super Productive with Spring Boot
56:56
SpringDeveloper
Рет қаралды 39 М.
Spring Tips: Demystifying Bootiful Magic
17:43
SpringDeveloper
Рет қаралды 15 М.
Introduction to Spring Data
31:09
SpringDeveloper
Рет қаралды 36 М.
JUnit 5:  the Next Step in Automated Testing
30:29
SpringDeveloper
Рет қаралды 25 М.
From Imperative To Reactive Web Apps
1:12:32
SpringDeveloper
Рет қаралды 14 М.
Going Reactive: Building Better Microservices - Rob Harrop
36:27
SpringDeveloper
Рет қаралды 10 М.
Spring Tips: Bootiful Dashboards
21:57
SpringDeveloper
Рет қаралды 26 М.
Spring Tips: Spring Modulith
37:39
SpringDeveloper
Рет қаралды 15 М.
В России ускорили интернет в 1000 раз
0:18
Короче, новости
Рет қаралды 1,8 МЛН
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 8 МЛН
Мой инст: denkiselef. Как забрать телефон через экран.
0:54
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,5 МЛН
PART 52 || DIY Wireless Switch forElectronic Lights - Easy Guide!
1:01
HUBAB__OFFICIAL
Рет қаралды 25 МЛН