does hobbes js used in aem 6.5 for testing or we prefer selenium? | Adobe Higher Education
Skip to main content
이 주제는 답변이 닫혔습니다.
최고의 답변: ManviSharma

 

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);
});

 

3 답변

ManviSharma
Adobe Employee
Adobe Employee
June 6, 2023

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

ChiragTa1작성자
Level 2
June 6, 2023

Hi @manvisharma ,

Can you explain a bit more about hobbes js and how its used to test a component using an example in aem?

ManviSharma
Adobe Employee
Adobe Employee
June 6, 2023

 

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);
});

 

Bhuwan_B
Community Advisor
Community Advisor
June 6, 2023

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

https://experienceleague.adobe.com/docs/experience-manager-65/release-notes/deprecated-removed-features.html?lang=en

rawvarun
Community Advisor
Community Advisor
June 6, 2023