Integration Testing in AEM

  • 915 views
Uploaded on

Presentation “Integration Testing in AEM“ by Lydia Balazs at CQCON2013 in Basel on 19 and 20 June 2013.

Presentation “Integration Testing in AEM“ by Lydia Balazs at CQCON2013 in Basel on 19 and 20 June 2013.

More in: Business , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
915
On Slideshare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
42
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.Integration Testing in AEMLydia Balazs | Senior QE Developer
  • 2. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.Who am I?2§  > 10 years CQ / AEM experience§  Senior Quality Engineer Developer, located in Basel§  Service Manager Germany§  Training§  Senior Consultant
  • 3. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.Testing successfully integrated!3§  Responsibility of Developers and Quality Engineers§  Part of AEM build§  Releases are depending on the status of the test results§  Code Coverage
  • 4. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.How did we do that?4§  Main responsibility: Quality Assurance team in Basel (Core team)§  Different AEM teams work closely together§  Core§  Digital Asset Management (DAM)§  Social Collaboration (SoCo)§  Marketing Campaign Management (MCM)§  AEM teams stick to the same process§  AEM teams use the same infrastructure incl. Integration Testing Framework
  • 5. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.Integration Testing in AEM – The Process!5WRITEPRODUCTCODEDEVWRITEITQADEVCOLLECTITMODULESQAEXECUTEITQAPUBLISHRESULTSQAIT = Integration Tests DEV = DeveloperQA = Quality Assurance
  • 6. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.WRITE [PRODUCT CODE]§  New features§  Optimization§  Bug fixing§  Refactoring6WRITEPRODUCTCODEDEV
  • 7. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.WRITE [IT]§  DEV writes IT§  In a module which is close to his code§  QA writes IT§  In separate projects / modules§  JUnit tests§  è A JAR artifact with an “integrationtest” classifier is built7WRITE ITDEVQA
  • 8. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.COLLECT ALL [IT]§  Maven Dependency Plugin§  Copies or unpacks dependencies or artifacts§  Artifacts are fetched from local or remote Maven repositories8COLLECTITMODULESQA
  • 9. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.EXECUTE ALL [IT]§  Maven Failsafe Plugin§  Executes integration tests in their own VM§  Quickstart Maven Plugin§  Designed by Adobe to generate Quickstart products§  Has other interesting goals (wait for it)§  Test Runner§  A POM file specialized in fetching IT modules, filtering andrunning ITs9EXECUTEITQA
  • 10. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.Quickstart Maven Plugin§  Available in Adobe Public Maven Repository§  Group id: com.adobe.granite.maven§  Artifact id: quickstart-maven-plugin§  The interesting goals I was talking about§  Install, start and stop multiple quickstart instances (author / publish)§  Use random port§  Use custom context root§  Install bundles10
  • 11. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.Test Runner§  Provides different profiles to§  Select which IT modules to collect§  Filter ITs (by supported Java version, package name, category)§  Select the right AEM version to install§  Enable code coverage analysis11
  • 12. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.Test Runner - Categories§  Non-Failing§  Failing§  SmokeTest§  All [IT] marked with category “SmokeTest” are executed during each build of AEMè Make sure that the basic functionality of the system is not broken§  A good smoke test is fast, simple and reliable!12
  • 13. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.Test Runner§  Execution§  Supports AEM versions > 5.5§  Collect the right IT modules for each supported AEM versionè Combination of different profiles allows Jenkins Matrix Jobs (a.k.a. MultipleConfiguration Projects)13
  • 14. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.Test Runner14• Author URL• Publish URL• Context RootTESTRUNNER• Configure HTTP Clients• Provides simple access toAEM HTTP API• Other testing utilities(Custom Assertion, JSON,…)ITFRAMEWORK • Run IT via HTTP against aSling instance• Scriptable tests• Run JUnit testscontributed by OSGibundlesSling TestingToolsSling Testing Tools:http://sling.apache.org/documentation/development/sling-testing-tools.htmlAEM is RESTful!
  • 15. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.PUBLISH RESULTS [IT]§  Continuous Integration (Jenkins)§  Code Coverage (Maven JaCoCo Plugin + Sonar)§  JaCoCo is a code coverage library for Java, which has beencreated by the EclEmma team15PUBLISHRESULTSQA
  • 16. © 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.