Тёмный

Testing Spring Boot Applications - Phil Webb 

SpringDeveloper
Подписаться 202 тыс.
Просмотров 35 тыс.
50% 1

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.

Опубликовано:

 

8 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@go_lang_thang
@go_lang_thang 5 месяцев назад
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 6 лет назад
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.
@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
@ivanmile78
@ivanmile78 6 лет назад
OMG, 0:54 latest commit 666ae66! That's what I call devil's commit :)
@tetsuya8736
@tetsuya8736 5 лет назад
Link to github repo github.com/philwebb/testing-spring-boot-applications
@michaelwijayagames
@michaelwijayagames 6 лет назад
How could your dependencies injection work without @Autowired? private UserVehicleService service; 20:29
@vasiliydorofeev1355
@vasiliydorofeev1355 5 лет назад
Please add github link
@tetsuya8736
@tetsuya8736 5 лет назад
github.com/philwebb/testing-spring-boot-applications
Далее
Testing with Spring Framework 4.3, JUnit 5, and Beyond
1:10:25
Bootiful Testing
1:18:16
Просмотров 28 тыс.
Fake watermelon by Secret Vlog
00:16
Просмотров 9 млн
Advanced Spring Data REST - Oliver Gierke
1:03:20
Просмотров 15 тыс.
JUnit 5:  the Next Step in Automated Testing
30:29
Просмотров 25 тыс.
From Imperative To Reactive Web Apps
1:12:32
Просмотров 14 тыс.
10 Ways to Get Super Productive with Spring Boot
56:56
JDK 8: Lessons Learnt With Lambdas and Streams
30:38
Просмотров 88 тыс.