How to create Test driven development(TDD) for AEM components. Is there any framework to do that in AEM?
I need to write junit test cases for components in AEM. Please explain me in detail.
Any help would be appreciated.
Thanks
Mini
Views
Replies
Total Likes
I recommend reading the Sling docs on this subject:
http://sling.apache.org/documentation/development/sling-testing-tools.html
I hope this points you in the right direction...
Views
Replies
Total Likes
I have got the same problem here. Testing in AEM.
First of all, unit tests in Java are obvious and explored well in last, at least, 10 years. Testing those: models, servlets and such is easy (at unit scope of course).
However, its getting nasty when you want to test component scope (so that you want to test 1. component rendering 2. dialog 3. design rules). There is a thing called Hobbes.js that is testing well single component (its just a JS code that is ran within editor (or developer I can't recall) mode). However, to easily prove that component as a whole can be inserted into a specific paragraph, can be controller by some post sling servlet business rules - it seems to be quite hard. You have to use some kind of Selenium testing for it - which take too much time and its too unstable to do it in TDD matter. Its even harder to measure code coverage then.
Basically I am asking same thing as minisanu here - is anybody doing TDD for application (that can cover all test cases, control whole environment well) in AEM? I am not a newbie in AEM but didn't see a good tool to do that so far.
Views
Replies
Total Likes
Looking for same solution...
recently there was a webminar on Unit testing in AEM... [Webinar | March] Ask the AEM Community Expert: Unit Testing with AEM Mocks
Views
Likes
Replies
Views
Likes
Replies