Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

mock fileupload i.e import using MockSlingHttpServletRequest

tasunil1
Level 2
Level 2

I need to Mock file import request using MockSlingHttpServletRequest so test my custom code. but I am unable to understand how to do it. if there is any resource available around multipart file upload

1 Accepted Solution
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@tasunil1,

Here's an example for JUnit 4: AEM Sling Servlet Unit Test Example Using wcm.io AEM Mocks, Servlet by Resource Type - https://sourcedcode.com/blog/aem/aem-sling-servlet-osgi-r7-by-resource-type-unit-test-junit-4-with-e...

View solution in original post

1 Reply
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@tasunil1,

Here's an example for JUnit 4: AEM Sling Servlet Unit Test Example Using wcm.io AEM Mocks, Servlet by Resource Type - https://sourcedcode.com/blog/aem/aem-sling-servlet-osgi-r7-by-resource-type-unit-test-junit-4-with-e...

View solution in original post