Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Integration Tests are ignored when executed with Intellij

Avatar

Level 2

Good afternoon, I just created an aem project based on the latest archetype.

When I press the green run button for the integration tests intellij tell me they are ignored.

 

satzlinger_2-1718198788996.png

 

 

satzlinger_0-1718198556718.png

The test work perfectly fine when executed with the maven command, but I want to debug them in Intellij.

I did not change anything about the project Structure.

 

I would highly appreciate if someone can tell me if this works for him and with what setup.

Thank you

 

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You will have to pass the environment details in system properties before running.
Something like 

h_kataria_0-1718210435277.png

Check this link as well https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/usi... 
Hope this helps

View solution in original post

4 Replies

Avatar

Level 6

Hi @satzlinger 


not sure but you can try to unlink maven once then it automatically links it back , unlinking and then re-linking Maven in IntelliJ IDEA could potentially fix your issue with the integration tests being ignored.

Ensure that the directory containing your integration tests is configured as a test source folder in IntelliJ IDEA.

Avatar

Correct answer by
Community Advisor

You will have to pass the environment details in system properties before running.
Something like 

h_kataria_0-1718210435277.png

Check this link as well https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/usi... 
Hope this helps

Avatar

Level 2

Thank you very much @h_kataria 

This is exactly what I needed.

Here are screenshots of how I had to set it up:

Out of the box they are ignored

satzlinger_0-1718272091301.png

Adjusting the runner resulted in a proper execution

satzlinger_1-1718272144713.png

satzlinger_2-1718272172513.png

 

I used

-ea
-Dsling.it.instances=2
-Dsling.it.instance.url.1=http://localhost:4502
-Dsling.it.instance.runmode.1=author
-Dsling.it.instance.adminUser.1=admin
-Dsling.it.instance.adminPassword.1=admin
-Dsling.it.instance.url.2=http://localhost:4503
-Dsling.it.instance.runmode.2=publish
-Dsling.it.instance.adminUser.2=admin
-Dsling.it.instance.adminPassword.2=admin

 

make sure you press the rerun button so the config is used

 

Avatar

Community Advisor

Hi @satzlinger 
What maven profile are you using when running the test

you need to check the run configuration and there need to use local as profile, similar to below maven command

 

mvn clean install -Plocal



Arun Patidar