i have watched your several videos on react integration with spring boot for crud operation and now this video, you are awesome , you deserve 10 x subscriber than this
Hey Ramesh bro, can u make a long, fat...Complete junit + mockito videos, with covering major real time scenarios. You've quite smooth flow of teaching.
Thanks! this video help me a lot to complete my first testing unit, i cant found a way to create a testing database to check my CRUD and routes! and you answered all at the same time!!!
Hi Bro, Firstly thank you very much for creating wonderful video. If we need test service layer with Junit. How we will do. If possible do the video on this concept plz. Its very useful for everyone.
Hi Ramesh, Do you have any video on how to use the real database like Oracle, MySQL, PostgresSQL etc for running test cases instead of using the in-memory database and also can we see the records/transaction(without rollback) in the database tables created by test cases? what configuration is required to do the same ?
In that case you should create a configuration file, a regular properties or yml file under src/test/resources/ and spring is smart enough to detect that when you run your tests, you can configure your desired database in that file. But it's not recommended. Instead, you should make sure you use the in-memory database in your test cases to avoid hitting the real database.
bro what is the point of testing the inbuilt jpa methods? if there is any custom method you wrote inside repo that can be tested. all these save, find are tested by the spring team.
Guys in case you are unable to use builder patters and it says "The method builder() is undefined for the type Employee" please make sure you have the project lombok configured in your working IDE.
hi, i already have an employee management system app created with springboot and configured with mysql, but these tests aren't running, throwing errors such as "table not found" and "could not prepare statement". I'm using constructor in the save employee method (not Builder). can someone please help me?
@@JavaGuides copyright 2022 the original author or authors,licensed under Apache,version 2.0(you may not use this file except in compliance with. You may obtain a copy of the license at.....link given
if you're facing an error related to @DatajpaTest annotation you have to add this @AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) annotation
i have watched your several videos on react integration with spring boot for crud operation and now this video, you are awesome , you deserve 10 x subscriber than this
Good video. Instead of using a Test method to save data in db to use in other test methods, you could use a sql file to load data in in-memory db.
Hey Ramesh bro, can u make a long, fat...Complete junit + mockito videos, with covering major real time scenarios. You've quite smooth flow of teaching.
that would be fantastic
Thanks! this video help me a lot to complete my first testing unit, i cant found a way to create a testing database to check my CRUD and routes! and you answered all at the same time!!!
Awesome video.
Explanation is on another level.
Somehow, I end up here for solution.
Thanks. Java Guides 🙂
Bro Make one video on junit and mockito using all the annotations like real time.
Thank you @javaGuides
Nice explanation
Very good teaching tq
Very simple tutorial with line by line coding 👌
Please, make video series where you testing all layers in a simple crud application
Awesome video clear all the concepts 👍
@JavaGuides Please make more videos on these JUnit Testing with different kinds of apps not just CRUD based apps
WoW! Really cool 😎
Excellent video
Hi Bro, Firstly thank you very much for creating wonderful video. If we need test service layer with Junit. How we will do. If possible do the video on this concept plz. Its very useful for everyone.
yes I am also looking for the same.. please make a video on testing service layer class
great work !
Awesome 👍👍
Your Videos are very good please do something for the low sound, I can't hear you clearly.
Good tutorial ❤️🙌
Can you please make a video on junit testing for DynamoDb with controller and service layer code.
Hi Ramesh, Do you have any video on how to use the real database like Oracle, MySQL, PostgresSQL etc
for running test cases instead of using the in-memory database and also can we see the records/transaction(without rollback) in the database tables created by test cases? what configuration is required to do the same ?
In that case you should create a configuration file, a regular properties or yml file under src/test/resources/ and spring is smart enough to detect that when you run your tests, you can configure your desired database in that file. But it's not recommended. Instead, you should make sure you use the in-memory database in your test cases to avoid hitting the real database.
Super teaching
Great video bro.. Thanks
I have a request, can you please cover EntityManager testing with Mockito?
bro what is the point of testing the inbuilt jpa methods? if there is any custom method you wrote inside repo that can be tested. all these save, find are tested by the spring team.
Hi, I added lombok dependency. But .builder is not working in employeeRepositoryTests. How to solve ?
Guys in case you are unable to use builder patters and it says "The method builder() is undefined for the type Employee" please make sure you have the project lombok configured in your working IDE.
Not able to call the lambkok bulder() method in test method
@JavaGuides Please add TimeStamps of Sub-Topics in this video in description
thank u
Sir please tell difference between @Bean and @Autowired
Npe while accessing the repository
Hii while using lambok it's asking license can u help??
Sir please make on video spring boot unit testing crash course
please make on video spring boot microservices tutorial
hi, i already have an employee management system app created with springboot and configured with mysql, but these tests aren't running, throwing errors such as "table not found" and "could not prepare statement". I'm using constructor in the save employee method (not Builder). can someone please help me?
those test are meant to use an enbedded h2 database, for mysql you have to disable autoconfiguration for @DataJpaTest
Hi bro your videos are awesome could you please make relationship like one to one many to one thise working with spring data jpa
These videos are already available on this channel
I have used @DataJpaTest annotation but it's giving error as "failed to load application context error". Please help
how u solved this ,i cant solve . so annoying
failed to load application context error pls fix
Why use lombok dependency
Instead of which one used
If you don't want to use lombok then remove lombok dependency from pom. xml and add getters/setters methods in JPA entity.
assertThat is not working, how to fix it
You need to import Assertions class from assertJ library. Example:
import org.assertj.core.api.Assertions;
@@JavaGuides yeah did that, but its not working
While using Lombok getting license error what to do???
What is the error? Can you paste here
@@JavaGuides copyright 2022 the original author or authors,licensed under Apache,version 2.0(you may not use this file except in compliance with.
You may obtain a copy of the license at.....link given
@@JavaGuides it's showing builder() is undefined for the type employee
@@harifactsandupdates which IDE you are using?
If you are using IntelliJ IDEA then restart it. If you are using Eclipse STS then you need to install Lombok first.
Instead of using DB, you should have just used Mock to fake the DB operations.
builder() is not working
install Lombok library in your IDE
If you are using IntelliJ then restart again will work
I am using sts and i have added dependency
Annotation is able to import but builder() method is not working
@@sanketlondhe7725 install lombok in STS. refer my video at ruclips.net/video/VR7VaiXHJEY/видео.html
sir builder() method not working in my system I followed you step by step in this video
Install Lombok library in your STS IDE
@@JavaGuides thank you I fix It
those aren't unit tests
if you're facing an error related to @DatajpaTest annotation you have to add this @AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) annotation
Failed to instantiate [org.springframework.data.jpa.repository.JpaRepository]: Specified class is an interface
please publish the code via GitHub.!