AEM UNIT TESTING - JCR,SLING,OSGi & AEM Mocks | Community
Skip to main content
varshsr
Level 5
August 26, 2016
Solved

AEM UNIT TESTING - JCR,SLING,OSGi & AEM Mocks

  • August 26, 2016
  • 5 replies
  • 8060 views

Hi ,

For unit testing AEM applications we can think to use Mock objects via Mockito / other framework , one problem is to Mock as much as needed 

If i see here there are Mocks provided for JCR,SLING & OSGi

Do we also have Mocks for AEM / CQ5 API like PageManger , TagManager like we have for JCR,SLING & OSGi

Such a thing will be really helpful , I see something here http://wcm.io/testing/ - Does Adobe approve this usage ? What i am worried about is the compatibility to AEM versions and its support

Does Adobe recommend its own AEM Mock rather http://wcm.io/testing/  - Please suggest ..

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Reply from internal team:-

2. Do Adobe recommend http://wcm.io/testing/ ?

we have an official recommendation but as that page says, parts of those mocks have been contributed to Apache Sling, and the people who contributed that are currently active Sling committers.

So it’s fairly safe to assume that those mocks are in active use and will be updated as needed - but it’s not our product so we cannot make any guarantees about that. As usual with open source, users should be ready to take over if needed.

 

3. Does Adobe recommend its own AEM Mock rather http://wcm.io/testing/ ?

Adobe do not have own AEM specific mocks.

 

~kautuk

5 replies

smacdonald2008
Level 10
August 29, 2016

This is a good topic to base a future AEM Ask the AEM Community Experts on. 

kautuk_sahni
Community Manager
Community Manager
August 30, 2016

I Have asked internal testing team to have a look at this.

I hope you would get answer soon.

~kautuk

Kautuk Sahni
varshsr
varshsrAuthor
Level 5
August 30, 2016

Thanks Scott and Kautuk for taking this up and sharing the thoughts . Also let know if there is a possibility to have AEM mocks as part of adobe maven repository ? (as we have mock for JCR/SLING/OSGi in other maven repository)

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
August 30, 2016

Reply from internal team:-

2. Do Adobe recommend http://wcm.io/testing/ ?

we have an official recommendation but as that page says, parts of those mocks have been contributed to Apache Sling, and the people who contributed that are currently active Sling committers.

So it’s fairly safe to assume that those mocks are in active use and will be updated as needed - but it’s not our product so we cannot make any guarantees about that. As usual with open source, users should be ready to take over if needed.

 

3. Does Adobe recommend its own AEM Mock rather http://wcm.io/testing/ ?

Adobe do not have own AEM specific mocks.

 

~kautuk

Kautuk Sahni