What unit test frameworks you use?

Avatar

Avatar
Level 1
nitinbhanushali
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
nitinbhanushali
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
nitinbhanushali
Level 1

07-06-2020

We have been using prosper from ICF to write our test cases but we stumbled upon situations where the library doesn’t provide necessary elements to write test cases and there are not much contributors to the library as well. We had to now switch to wcm io. Im wondering what people have been using and if wcm io provide everything necessary to write unit tests.

 

__________________________________________________________________________________________________

3 bhk in dombivli 3 bhk flats in dadar 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

645 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

645 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

08-06-2020

@nitinbhanushali 

I've been using wcm.io mocks used with the Mockito Test framework for my Unit Tests, and it's working well for me. 

https://wcm.io/testing/

https://site.mockito.org/

On a side note: Check out the best practices for AEM unit test, https://cqdump.wordpress.com/2020/03/30/best-practices-for-aem-unittests/

Answers (2)

Answers (2)

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,048 posts

Correct reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,048 posts

Correct reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

08-06-2020

You can use Sling Mocks   and wcm.io for writing your Mocks. There is a good article by Jorg on SlingContext which is really helpful in writing  and testing AEM Mocks. Please check the same here

There are additional article from him which help you to work with Sling Mocks

Part 1 - https://cqdump.wordpress.com/2019/01/09/writing-unit-tests-for-aem-using-slingmocks/

Part -2 - https://cqdump.wordpress.com/2019/01/14/writing-unit-tests-for-aem-part-2-maven-setup/

Part 3- https://cqdump.wordpress.com/2019/01/17/writing-unittests-for-aem-part-3-mocking-resources/

 

Hope this helps. There are quite a few articles on the same out there. 

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile
jbrar
Employee

08-06-2020

You can find the detailed implementation of wcm io mocks and mockito at [1] with examples

 

[1] https://docs.adobe.com/content/help/en/experience-manager-learn/getting-started-wknd-tutorial-develo...