How to test the read data from S3 bucket in spring boot application #2286
vishalbiradar
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I validate the read files functionality in the spring boot application?
I want to test it with 100% code coverage.
Can anyone help me in doing so?
Spring Boot Version: 2.3.4.RELEASE
Java Version: 8
aws-java-sdk-s3: 1.11.637
mockito: 3.3.3
S3 Read Code
Test Code
Tried with mockito but unable to get the code coverage when I use @mock annotation but when I use @SPY and @Injectmocks annotation on service I can get the code coverage but the test is failing.
Error
when I use @SPY and @Injectmocks annotation on the service I can get the code coverage but the test is failing.
Beta Was this translation helpful? Give feedback.
All reactions