Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Questions related to Custom Functional Testing

Avatar

Level 1

A few questions while building an AEM custom functional test:  

To build a test for a custom component, such as the one below, what kind of arguments are needed. What should be the format of the argument? 

 

Image.png

 

Are there any demos available to use as a reference?  

AEM Functional Testing Reference: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/using-...

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Kabrawalaak 

 

I did not get the exact ask assuming that you are talking about running the ui.test and it.test reference can you refer to below project as an example and try 

 

https://github.com/adobe/aem-project-archetype/tree/develop/src/main/archetype/it.tests/src/main/jav...

 

https://github.com/adobe/aem-project-archetype/tree/develop/src/main/archetype/ui.tests

 

Unit testing custom component

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-devel...

 

 

Hope this is useful

 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

@Kabrawalaak 

 

I did not get the exact ask assuming that you are talking about running the ui.test and it.test reference can you refer to below project as an example and try 

 

https://github.com/adobe/aem-project-archetype/tree/develop/src/main/archetype/it.tests/src/main/jav...

 

https://github.com/adobe/aem-project-archetype/tree/develop/src/main/archetype/ui.tests

 

Unit testing custom component

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-devel...

 

 

Hope this is useful

 

Avatar

Level 2

Hi @Kabrawalaak @Manu_Mathew_ @Jagadeesh_Prakash ,

 

How to set date property to component in it.test functional testing.

TestComponent com = new TestComponent(componentclient, xfPath,"/master/jcr:content/root/componenent", "comp");

com.setProperty("html", "test");

we have option to set string and string[] and int values but not date property. i am extending the 

AbstractComponent. 

import com.adobe.cq.testing.client.ComponentClient;

import com.adobe.cq.testing.client.components.AbstractComponent;

 

Could you please help here. 

 

Thanks in advance.