Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

New hobbes.js functional test framework in AEM 6.0 and using for CI builds

Avatar

Level 2

Hi,

Just saw this on hobbes.js - http://aempodcast.com/2014/testing/aem-6-0-functional-testing-framework-overview/#.U7KrIqhGxPh - which is fantastic news. Digging into the source of hobbes it looks like it can be run to produce a junit xml style report. We'd love to incorporate the hobbes functional tests into our CI build, and this looks ideal. However, I can't see how to invoke hobbes in this mode. 

Can someone explain how we can run all the hobbes tests for a site and produce the junit XML report ?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Yes you can automize with ci builds. For that need to have Hobbes.js Maven Runner & then supply the parameter.  I do not know the delivery mode, date & plan for accessing those maven runner. Can you please file daycare to get official answer?

View solution in original post

8 Replies

Avatar

Correct answer by
Level 10

Yes you can automize with ci builds. For that need to have Hobbes.js Maven Runner & then supply the parameter.  I do not know the delivery mode, date & plan for accessing those maven runner. Can you please file daycare to get official answer?

Avatar

Former Community Member

Love it. Any chance this can be used with AEM 5.6.1 ??

if not, what is the recommended framework for UI testing in 5.6.x (Cactus, Selenium, ...)?

Regards

Fraser.

Avatar

Level 2

OK, will do. Pending that reply can you tell me what HTTP calls / URLs are invoked to create the JUnit report ? We can then hook this into our build without the need of the maven plugin.

Avatar

Level 10

sneakybeaky wrote...

OK, will do. Pending that reply can you tell me what HTTP calls / URLs are invoked to create the JUnit report ? We can then hook this into our build without the need of the maven plugin.

 

As you know it is real browser testing framework and you can't invoke & get report using http calls directly.  The Hobbes.js Maven Runner internally launches the browser and invokes the test case run on browser step by step like show test sidekick, running test case.  At the end it gets jUnit XML result data which will be parsed & then stores in internal slave which can be assessed.  There is no single command or url to get the result.

Avatar

Level 2

Hi Sham,

Thanks for your reply - I didn't phrase my question well. As you say I understand that the tests must run from a browser. So we can use selenium or similar as part of our build to do that phase. However, it seems from the hobbes source code that the JUnit XML report can be stored within the AEM instance, so once the browser has run the tests and exited we can have some code using org.apache.sling.testing.tools.sling.SlingClient to fetch that Junit XML report, parse it and fail the build if any tests failed - similar to how    org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner works for the wrap up phase.

So I was wondering how we run the tests from within the browser in the mode where the JUnit style XML report is saved, and then what is the URL we would fetch that XML report from ?

Avatar

Level 10

sneakybeaky wrote...

Hi Sham,

Thanks for your reply - I didn't phrase my question well. As you say I understand that the tests must run from a browser. So we can use selenium or similar as part of our build to do that phase. However, it seems from the hobbes source code that the JUnit XML report can be stored within the AEM instance, so once the browser has run the tests and exited we can have some code using org.apache.sling.testing.tools.sling.SlingClient to fetch that Junit XML report, parse it and fail the build if any tests failed - similar to how    org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner works for the wrap up phase.

So I was wondering how we run the tests from within the browser in the mode where the JUnit style XML report is saved, and then what is the URL we would fetch that XML report from ?

 


I got your query. AFAIK report is not stored in AEM repository and you can't fetch.

Avatar

Level 3

Can we have support case ID for reference. I have similar requirement to hook my hobbes to CI. Also can Adobe make the CI integration capability and its details to public so everyone can access this information. Thanks!

Avatar

Level 3

Can you also post the day care ase case ID for reference?