Expand my Community achievements bar.

Testing of Adobe Archetype-10 Project Artifacts

Avatar

Level 10

Hi all,

When we install Adobe Archetype-10, we get so many functionalities along with it.

  • how to use JUNIT tests within Java files
  • how to use a scheduler service
  • how to use Sling Servlets
  • how to use a basic event handler
  • how to perform component inheritence
  • how to reference partial page files in a HTL page component
  • how to work with ClientLibs in a HTL component

Is there any place where testing of all these things is covered?

Ex: how to use a scheduler service or how to use a basic event handler.

For these we may have to configure some things and see the results, given that corresponding code was already written and deployed.

Another example is how to perform unit testing....

Appreciate your replies....

Thanks,

Rama.

5 Replies

Avatar

Level 10

Hi,

Is there any place where testing of all these things is covered, given that code is deployed and is up and running?

I did event handling in 6.0 and want to see how the event handling code in archetype works.

Thanks,

Rama.

Avatar

Level 10

Hi,

As an example, l took SimpleScheduledTask.

I went to http://localhost:4502/system/console/configMgr, clicked "A Scheduled task" and entered a text "Rama" in A parameter and saved it.

The code says that it should print "SimpleScheduledTask is now running, myParameter='Rama" once every 30 seconds. (Kindly validate my understanding).

I checked up all logs with today as the changed date. access, request, error, error.log.and found entries for SimpleScheduledTask, but not the one above.

Kindly suggest how to test this class and also others.

Thanks,

Rama.

Avatar

Administrator

Check this PDF :- https://adobesummit.lanyonevents.com/2016/connect/fileDownload/session/8E3782B67D261C7792E70B661F189...

This is explain most of your doubts.

Table of Contents related to Archetype-10
1. Introduction 3
1.1. Overview 3
1.2. Prerequisites 4
2. Getting Started 4
2.1. Launching in debug mode 4
2.2. Log file watching 4
2.3. AEM launched 5
2.4. Creating a new project 6
3. The Basics 9
3.1. The project structure 9
3.2. The stack 9
3.3. Page Rendering 10
4. Front-end development 12
4.1. Synchronizing edits 12
4.2. Using Photoshop Extract 13
4.3. Sightly Template Language 14
5. Working in Eclipse 17
5.1. Editing Components and Bundles 17
5.2. Advanced SlingModel logic 18
5.3. Debugging 20

~kautuk



Kautuk Sahni

Avatar

Level 10

Hi Kautuk,

This document is very essential to understand what is there is Archetype 10 project.

But, my question is more towards testing them on AEM.

Given that the SlingModel is deployed as a part of Archetype 10 project, how could I show a set of audience that it is working.

Similarly the Scheduler. This may involve configuring something in Config Manager and showing that periodically something is happening.

I have the code to check and delete if exists a jcr folder periodically, on a previous aem version.

Hello World is verifiable, as we could see the page and even the deployment article describes about it. As long as that page is visible, we are fine with it.

Appreciate your replies.

Thanks,

Rama.