Test Cases for OSGi R6 specification in AEM 6.3 | Community
Skip to main content
rawvarun
Community Advisor
Community Advisor
November 17, 2017
Solved

Test Cases for OSGi R6 specification in AEM 6.3

  • November 17, 2017
  • 4 replies
  • 2135 views

Hi,

I want to write Test Cases for Servlet & Services written using OSGi R6 specification (i.e. Official OSGi Declarative Services Annotations in AEM - Adobe Experience Manager | AEM/CQ | Apache Sling ) in AEM 6.3.

But, facing issues to write Test Cases. Could anyone tell which Test case package i can use to write Test Cases?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by rawvarun

Hi All,

We raised the adobe Ticket and they shared the following link:

http://felix.apache.org/documentation/faqs/apache-felix-bundle-plugin-faq.html#use-scr-metadata-generated-by-bnd-in-unit-tests

We were able to solve the problem.

4 replies

smacdonald2008
Level 10
November 17, 2017

Here is a GEMS session that talks about  best practice while testing AEM content -- From Unit Testing to Integration Test of an AEM Application

rawvarun
Community Advisor
rawvarunCommunity AdvisorAuthor
Community Advisor
November 17, 2017

Hi,

"With the maven-scr-plugin you may be used to finding the DS output under /target/classes/OSGI-INF and/target/classes/OSGI-INF/metatype. With the maven-bundle-plugin you will have to unzip the compiled artifact (the jar file) to find the DS output in its /OSG-INF directory."

Is the above step mandatory to run the Test Cases for my Servlet.

Reference: Official OSGi Declarative Services Annotations in AEM - Adobe Experience Manager | AEM/CQ | Apache Sling

joerghoh
Adobe Employee
Adobe Employee
November 18, 2017

No, you don't have to.

Apache Sling :: Testing Sling-based applications  contains a number of hints, which approach to use.

rawvarun
Community Advisor
rawvarunCommunity AdvisorAuthorAccepted solution
Community Advisor
November 27, 2017

Hi All,

We raised the adobe Ticket and they shared the following link:

http://felix.apache.org/documentation/faqs/apache-felix-bundle-plugin-faq.html#use-scr-metadata-generated-by-bnd-in-unit-tests

We were able to solve the problem.