Expand my Community achievements bar.

SOLVED

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

Avatar

Level 5

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 ..

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

View solution in original post

5 Replies

Avatar

Level 10

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

Avatar

Administrator

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

I hope you would get answer soon.

~kautuk



Kautuk Sahni

Avatar

Level 5

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)

Avatar

Correct answer by
Administrator

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