I want to add unit test in my project since I use AEM cloud manager pipeline to trigger build. During which there is a step to check unit test. I'm not sure which framework would be good to go ahead with. [MOCKITO, SPOCK, JUNIT, ProsperSpec, anything else that is latest, etc]
Solved! Go to Solution.
According to official Adobe documentation, and Adobe best practices below should be used for unit testing:
We will be using AEM best practices, and use:
This Adobe documentation also describes step by step how to setup this on project level.
Please refer this document for details of framework used for writing Unit test.
You can create a new sample project with latest archetype to get few Unit tests already created for reference. Please refer this document which has command for Cloud project setup :
SS from above link: