This blog will discuss the usage of the Hobbes.js testing library available in AEM 6.0 and above, to run UI tests from within the browser. This framework technically relies on clientlibs, and the dependencies and categories settings of the clientlibs differentiates them from regular clientlibs.
The 4 quick setup steps:
- Create a Client Library Folder in the desired location, say, in a component as apps/myProject/components/myComponent/tests.
- Create Test Suite(s), which are just a collection of similar Test Cases. There can be more than one Test Suite in the Client Library Folder.
- Specify Test Cases for each Test Suite.
- Add Actions in each Test Case that will validate (or invalidate) the Test Case.