Testing Spring Boot Applications - Phil Webb

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 2025

ความคิดเห็น • 15

  • @go_lang_thang
    @go_lang_thang 9 หลายเดือนก่อน

    2024, This video still relevant !!!
    Thanks a lot !!!

  • @ash-211-q8j
    @ash-211-q8j 6 ปีที่แล้ว +9

    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 8 ปีที่แล้ว

    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.

  • @michaelwijayagames
    @michaelwijayagames 6 ปีที่แล้ว

    How could your dependencies injection work without @Autowired?
    private UserVehicleService service;
    20:29

  • @artemaz
    @artemaz 7 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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 ปีที่แล้ว +2

    OMG, 0:54 latest commit 666ae66! That's what I call devil's commit :)

  • @vasiliydorofeev1355
    @vasiliydorofeev1355 6 ปีที่แล้ว

    Please add github link

    • @tetsuya8736
      @tetsuya8736 5 ปีที่แล้ว

      github.com/philwebb/testing-spring-boot-applications

  • @tetsuya8736
    @tetsuya8736 5 ปีที่แล้ว

    Link to github repo
    github.com/philwebb/testing-spring-boot-applications