Solved! Go to Solution.
Views
Replies
Total Likes
To test a component with Hobbes.js, define a test case with actions and assertions, set up the test scenario, and run the test using hobbes.runTest.
Example:
hobbes.testCase('MyComponent Test', function (browser, done) {
// Test scenario setup
browser.find('.my-component').click();
// Assertions
browser.assert.elementPresent('.my-component .title');
browser.assert.containsText('.my-component .title', 'Hello, World!');
// Run the test
browser.runTest(done);
});
Hi,
Hobbes.js and Selenium are both commonly used for testing in AEM 6.5, but they serve different purposes and have different features.
Hobbes.js is a JavaScript-based testing framework specifically designed for AEM. It provides a set of utilities and APIs that make it easier to write tests for AEM components and features. On the other hand, Selenium is a widely-used testing framework for web applications in general, including AEM.
If you are primarily testing AEM components and features, and want a framework that is tailored for AEM, Hobbes.js can be a good choice
Hi @ManviSharma ,
Can you explain a bit more about hobbes js and how its used to test a component using an example in aem?
To test a component with Hobbes.js, define a test case with actions and assertions, set up the test scenario, and run the test using hobbes.runTest.
Example:
hobbes.testCase('MyComponent Test', function (browser, done) {
// Test scenario setup
browser.find('.my-component').click();
// Assertions
browser.assert.elementPresent('.my-component .title');
browser.assert.containsText('.my-component .title', 'Hello, World!');
// Run the test
browser.runTest(done);
});
@chiragtakkar5The Hobbes.js framework comes with AEM, it doesn’t require additional license to use it. But noted that in AEM 6.5, Adobe’s deprecated Hobbes.js, and recommends customers to Selenium automation.
In the future Selenium should be used as hobbes is deprecated.
Views
Likes
Replies