cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to run unit tests within addons when running ant alltests or ant allwebtests?

Former Member
1,211

I have an addon which contains unit tests under /acceleratoraddon/web/testsrc. These tests run just fine when run from within an IDE, but they aren't picked up at all by either ant alltests or ant allwebtests. I'm using Hybris version 6.6.0.0.

I came across this 2014 post: https://answers.sap.com/questions/12750447/how-to-test-addon-controllers.html and attempted to implement the recommendation but it didn't work because the tests would't compile when copied to web/testsrc in the storefront extension. In addition to this, that directory is under source control so copying files there during the build is highly undesirable.

I am also aware of TestClassesUtil (invoked by ant), which scans the hybris environment for test classes on the classpath but I have been unsuccessful at getting it to pick up the tests in the addon.

Is there currently any way of getting the unit tests in an addon to run when invoking those ant targets?

0 Kudos

Do we have a solution for that problem? I still have the problem with version=2011.12

Former Member
0 Kudos

I saw your posted comment. I recommend raising your question again as a new question and follow our rules of engagement: https://community.sap.com/resources/rules-of-engagement. The author of the original question is no longer active in the community and won't receive your query. Feel free to take our Q&A tutorial at: https://developers.sap.com/tutorials/community-qa.html. With these tips you'll be able to prepare questions that draw responses from our members.

Also, you must remove your profile picture and replace it with an image you have the rights too.

Thanks!

View Entire Topic
sbouwers
Explorer
0 Kudos

I struggle with the same problem, any solutions in the meanwhile?