Expand my Community achievements bar.

Understanding Junit5 usage in AEM 6.5.9 and AEMaaCs Java Classes | Archetype 27 | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

Understanding Junit5 usage in AEM 6.5.9 and AEMaaCs Java Classes | Archetype 27 by AEM Queries & Solutions

Abstract

As we all know that latest JUnit is 5 which is the next generation of JUnit. The goal is to create an up-to-date foundation for developer-side testing on the JVM. This includes focusing on Java 8 and above, as well as enabling many different styles of testing.

We will be using AEM best practices, and use (Adobe Recommended):

JUnit 5
Mockito Testing Framework
wcm.io Test Framework (which builds on Apache Sling Mocks)

As we all know nowadays AEM archetype comes with inbuilt Junit5 dependencies.
So let’s understand what we get as part of AEM archetype 27 in terms of Junit 5.

NOTE: Below dependencies are OOTB with AEM Archetype 27 as tested.

1. Understanding the Dependencies and Plugins:
1.1 REQUIRED DEPENDENCIES:
As part of the project archetype you should have JUnit 5 (jupiter) and mockito dependencies in your POM.xml. If you don’t have those dependencies you can add it up!

Note that junit-jupiter-engine is the main JUnit 5 library


org.junit.jupiter
junit-jupiter-engine
5.3.1
test


org.mockito
mockito-core
2.21.0
test

Read Full Blog

Understanding Junit5 usage in AEM 6.5.9 and AEMaaCs Java Classes | Archetype 27

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies