Unit and Integration Tests in Spring Boot JPA Example | Tech Primers

  Рет қаралды 113,119

Tech Primers

Tech Primers

Күн бұрын

Пікірлер: 89
@junysanteliz3796
@junysanteliz3796 4 жыл бұрын
Thank YOU for this! Excellent content. Very well taught! You just earned yourself a subscriber my man
@ScoobyDoo-ct9nd
@ScoobyDoo-ct9nd 4 жыл бұрын
your tutorials are good ..keep doing thanks
@vishalkadam8722
@vishalkadam8722 3 жыл бұрын
Very helpful.. Thanks for informative video.
@TechPrimers
@TechPrimers 3 жыл бұрын
Glad it was helpful!
@asifimam8174
@asifimam8174 4 жыл бұрын
kindly write some JPA unit test cases for Transactional Propagation Level and ISOLATION Levels and Level1 and Level 2 Cache Coverage
@sangkim6338
@sangkim6338 5 жыл бұрын
Thanks for the good video. There is one part that I don't quite seem to get - when do you put data into the h2 DB you configured?
@haricharanreddy1633
@haricharanreddy1633 4 жыл бұрын
Hey at 4:56 what if am mocking a method which returns map Collections. emptyList() is giving error
@mo9204
@mo9204 5 жыл бұрын
Tell us when you use Jpa over CrudRepository ?
@bookswiper
@bookswiper 2 жыл бұрын
Great insight besides learning about unit and integration test
@shakib_04
@shakib_04 2 жыл бұрын
are you sure webmvctest annotation is only for unit test not for integration test?
@bandapalliharish155
@bandapalliharish155 6 жыл бұрын
Nice video...... also can you please post a video related to testing of spring boot security which uses daoAunthenticationprovider
@gurugovindgarg3771
@gurugovindgarg3771 4 жыл бұрын
👍, can you suggest how to test interface projection jpa bz we can’t set value directly to interface field
@rajum2195
@rajum2195 2 жыл бұрын
thanks for a good video,your explanation is so nice,can you make a video for integration testing for a quarkus project
@andrzejokon1517
@andrzejokon1517 6 жыл бұрын
Great tutorial. Thank you!
@AhmadIsyfalanaAmin
@AhmadIsyfalanaAmin 5 жыл бұрын
Great tutorial. Would you like to add subtitles to this video?
@amarreddy09
@amarreddy09 4 жыл бұрын
Hi .. can you please do session on spring batch+jpa+h2 testing ... Thanks
@samarthurs8000
@samarthurs8000 6 жыл бұрын
Thanks a lot, brother. Your videos are very informative.
@BM-pz4mt
@BM-pz4mt 2 жыл бұрын
Hi sir, please can you explain Spring Batch unit and Integration testing in detailed.
@abinashdhal9103
@abinashdhal9103 4 жыл бұрын
Hi , I have been given a task to implement and the task as follows . I need to integrate Spring cloud contract test to the existing project and the auto generated tests have to be validated against data in the in memory database(h2). i have integrated the contract testing to the existing project . can you give quick suggestion to implement the rest of it and if you could make a video which i know might take long time. Thanks in advance.
@KiranInEurope
@KiranInEurope 6 жыл бұрын
can you create same unit and integration testing Spring Boot Integration DSL using microservices
@sanjaykantheti4002
@sanjaykantheti4002 5 жыл бұрын
If time permits could you make a video on powerMockito as well.
@TechPrimers
@TechPrimers 5 жыл бұрын
Sure will do
@sanjaykantheti4002
@sanjaykantheti4002 5 жыл бұрын
@@TechPrimers Thanks Ajay!! Your channel is very informative and been following from past 1 year. keep going :)
@fairozahmed6888
@fairozahmed6888 7 жыл бұрын
Very helpful. Thank you so much :)
@virtexamit
@virtexamit 7 жыл бұрын
Nice video, can you make a video covering unit/integration test for shopping cart or something a bit complex application where in we have multiple flows hence multiple UT n integration test classes.
@TechPrimers
@TechPrimers 7 жыл бұрын
sure. wil try amit
@virtexamit
@virtexamit 6 жыл бұрын
Thanks a lot can you also trying a demo with sample test data. For e.g. metadata is prerequisite before running integration tests.
@stephaneislistening6103
@stephaneislistening6103 6 жыл бұрын
What if we don't want to use the TestPropertySource annotation ? Is there any alternative way ?
@maryonmayor
@maryonmayor 6 жыл бұрын
how do u do when u need to test a post via a form? and having an element that is an array.
@isidme
@isidme 6 жыл бұрын
Hey Thanks... How can we write Integration test when JWT security is enabled
@amitsinha4159
@amitsinha4159 5 жыл бұрын
Hi Sir, Could you please make a video for following use case Spring boot application with Mongo db integration but when we perform search operation then via elastic search we should retrieve record for performance reasons. I'm little confused here how to deal with this. Thanks in Advance
@stepantzov
@stepantzov 6 жыл бұрын
Hi, thanks for sharing this! but why you do not have @ContextConfiguration?
@TechPrimers
@TechPrimers 6 жыл бұрын
yeah it was an older notation
@Turnpost2552
@Turnpost2552 5 жыл бұрын
Really likes the song in the background.
@DigvijayBhakuni-1990
@DigvijayBhakuni-1990 7 жыл бұрын
do video on spring data pipelining using spring XD and Data Flow
@TechPrimers
@TechPrimers 7 жыл бұрын
sure vijay
@rameshc6074
@rameshc6074 Жыл бұрын
Where is the assertion for integration test
@venkatch2584
@venkatch2584 5 жыл бұрын
Hi bro, your videos are useful, learn a lot. do you any videos for READY API test cases??
@princegovind
@princegovind 2 жыл бұрын
Bro , How to reduce Test execution time in build time of springBoot ..?
@TechPrimers
@TechPrimers 2 жыл бұрын
One option is you can make tests run in parallel
@prasadchaudhari2063
@prasadchaudhari2063 5 жыл бұрын
how we can up spring boot context once and use same context for all junits?
@TechPrimers
@TechPrimers 5 жыл бұрын
You can create an abstract implementation and use that in all the tests
@palashkhatri7820
@palashkhatri7820 7 жыл бұрын
Nice video got the concept
@TechPrimers
@TechPrimers 7 жыл бұрын
thanks Palash
@TheMikewonder1
@TheMikewonder1 6 жыл бұрын
Hi, please can you make a video on how to test a web application using spring boot and Junit.
@TechPrimers
@TechPrimers 6 жыл бұрын
Hi Daniel, you can find it here - kzbin.info/www/bejne/boSboGdsltuad9k
@mohammedsufi4649
@mohammedsufi4649 5 жыл бұрын
Thank you for this video also please explain how mockMvc.perform() method worked in unit testing without @AutoConfigureMockMvc annotation, why should we use that in Integration testing alone even though we are autowiring the object?...
@vedikaashtekar4356
@vedikaashtekar4356 3 жыл бұрын
I think WebMvcTest includes both both the @AutoConfigureWebMvc and the @AutoConfigureMockMvc. Correct me if I am wrong.
@javatips5979
@javatips5979 3 жыл бұрын
@@vedikaashtekar4356 yes that is right
@machhindraneupane9207
@machhindraneupane9207 7 жыл бұрын
Sir make a video on resttemplet with form authentication spring boot
@TechPrimers
@TechPrimers 7 жыл бұрын
sure will do soon
@manggalawiryawan3242
@manggalawiryawan3242 6 жыл бұрын
Can i make contextLoads more than one?or i make other method same like contextLoads?
@TechPrimers
@TechPrimers 6 жыл бұрын
no you cannot do it load more than once in the same test
@RonaLz4
@RonaLz4 5 жыл бұрын
But, is it really an integration test? I mean, okay. We test from the endpoint all the way to the repository, but with an h2. My point is, that sometimes doing "integration" tests with an H2 database, are in someway integration, but you are testing with a non-productive database. Anyway, that was just a thought :D Great video!
@skaffen
@skaffen Жыл бұрын
An integration test is testing two elements of code. Yes it is. It doesn't have to be end to end
@dileepalla6769
@dileepalla6769 7 жыл бұрын
can u post an vedio on how maven works?
@TechPrimers
@TechPrimers 7 жыл бұрын
I have done that today. checkout the latest video
@dileepalla6769
@dileepalla6769 7 жыл бұрын
i see that vedio thx
@dileepalla6769
@dileepalla6769 7 жыл бұрын
can u post an example on google cloud how to host our application in google cloud with step by step
@puneetnamdeo
@puneetnamdeo 6 жыл бұрын
please provide spring security with mockito.
@richardlanglois5183
@richardlanglois5183 6 жыл бұрын
Very informative!
@ganeshpasupuleti5485
@ganeshpasupuleti5485 5 жыл бұрын
can we unit test a spring jpa repository??
@TechPrimers
@TechPrimers 5 жыл бұрын
Yes you can. But you end up mocking the DB part
@supunkavinda8660
@supunkavinda8660 7 жыл бұрын
hi sir, can you do spring boot batch tutorial.
@TechPrimers
@TechPrimers 7 жыл бұрын
sure supun
@WeWalkAI
@WeWalkAI 4 жыл бұрын
Good stuff. Still useful.
@karthikeyanthiruvoosivanai3181
@karthikeyanthiruvoosivanai3181 7 жыл бұрын
Getting below error when execute unit testing test case Failed tests: SpringbootRestMockitoIntegrationtestApplicationTests.contextLoads:40 Wanted but not invoked: com.tsk.springboot.mockito.resource.UserRepository#0 bean.findAll();
@TechPrimers
@TechPrimers 7 жыл бұрын
Looks like findAll()is not getting mocked
@SandeepPandey-ku4mg
@SandeepPandey-ku4mg 6 жыл бұрын
good tutorial....please follow proper TDD approach to write the test first, than come to implementation, i.e. Fail-Pass-Refactor cycle
@d2k2
@d2k2 Жыл бұрын
so.. right?
@vedikaashtekar4356
@vedikaashtekar4356 3 жыл бұрын
Video is really good and helpful but the background music is really very disturbing. Without music it can be really good learning!
@yveromeev
@yveromeev 6 жыл бұрын
thank you very much!
@valentineezugu7211
@valentineezugu7211 7 жыл бұрын
@RequestMapping("/bookInfo" ) public String bookInfo(@RequestParam("id") Long id, Model model) { Book book = bookService.findOne(id); model.addAttribute("book", book); return "bookInfo"; } can some one test this controller just learning how to test? thanks
@Jay-br2ud
@Jay-br2ud 3 жыл бұрын
Great
@andrii_popov
@andrii_popov 5 жыл бұрын
@WebMvcTest is the most useless test type in the whole Spring Framework, it tests no logic, I cannot image you forget to invoke service method in your controller)
@BharCode09
@BharCode09 4 жыл бұрын
Infact many mocking tests are useless and highly time consuming to write when called this, do that, blah blah! I slways do integration testing after unit testing.
@shihm4013
@shihm4013 6 жыл бұрын
had to mute because of the buzzing/ringing sound
@DudeMcSky
@DudeMcSky 4 жыл бұрын
These are integration tests.
@skaffen
@skaffen Жыл бұрын
As mentioned in title.
@DudeMcSky
@DudeMcSky Жыл бұрын
@@skaffen well technically the title says "Unit and Integration tests" ...there are no unit tests here.
@farhaankazi7134
@farhaankazi7134 4 жыл бұрын
great
@jhonnyjamifernandez447
@jhonnyjamifernandez447 5 жыл бұрын
please enable automatic translation, Your videos are great but I'm not very good in English
@mrchow3177
@mrchow3177 5 жыл бұрын
If you use inteligay this wont work right of the bat..
@mertyertugrul
@mertyertugrul 5 жыл бұрын
I like your tutorials, very helpful. But I really wish that you could pronunciate better, it is really hard to understand your accent.
@farhaankazi7134
@farhaankazi7134 4 жыл бұрын
This is Indian English accent. Most of us speak in this way. Neutralizing English is bit difficult and take time. It is required.
@faN4t1k
@faN4t1k 7 жыл бұрын
your music is annoying
@kirankumarkavali3897
@kirankumarkavali3897 3 жыл бұрын
Hi, Can you please make a video on how to test spring batch application using spring boot and Junit
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54
Profiles in Spring Boot | Spring Profiles | Tech Primers
14:13
Tech Primers
Рет қаралды 72 М.
Java Unit Testing with JUnit - Tutorial - How to Create And Use Unit Tests
21:35
Spring Boot 3 Integration Testing With TestContainers
22:08
Daily Code Buffer
Рет қаралды 15 М.
REST API Documentation using Swagger2 in Spring Boot | Tech Primers
26:27
Spring Boot with HTTPS Example | Tech Primers
14:50
Tech Primers
Рет қаралды 83 М.
Spring Boot - Testing basics
16:05
Defog Tech
Рет қаралды 76 М.
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН