icfnext / prosper

A Spock-based integration testing library for prosperous AEM development.
Other
28 stars 19 forks source link

Prosper fails when we integrate with Jenkins with null pointer #19

Closed kalimuthup closed 6 years ago

kalimuthup commented 6 years ago

Hi Team, I am working to integrate Prosper test framework in my company and i already posted few issues i faced as part of it and how i solved it.Here is one more issue,when i run my project in my local using maven, all my test cases run successfully and able to create report as well.But when i run the same branch in Jenkins it fails with the error listed below *ServiceImplSpec Time elapsed: 3.033 sec <<< ERROR! java.lang.NullPointerException: null at org.apache.jackrabbit.vault.fs.io.FileArchive.open(FileArchive.java:62) at com.icfolson.aem.prosper.importer.ContentImporter.importVaultContent(ContentImporter.groovy:32) at com.icfolson.aem.prosper.specs.ProsperSpec.importVaultContent(ProsperSpec.groovy:308) at com.icfolson.aem.prosper.specs.ProsperSpec.setupSpec(ProsperSpec.groovy:70) Results : Tests in error: ServiceImplSpec>ProsperSpec.setupSpec:70->ProsperSpec.importVaultContent:308 » NullPointer

Any idea why i am getting ProsperSpec.importVaultContent:Nullpointer ?

kalimuthup commented 6 years ago

The reason for the above error is ,its not able to load /SLING-INF/content and when it tries to load this ,it throws null pointer in Prosper API class.Do i need to configure anything in Jenkins to point the resources?

kalimuthup commented 6 years ago

I resolved it,its related to workspace configuration.Finally , we enabled Prosper in for AEM Testing.Thanks team for developing this wonderful framework.

markdaugherty commented 6 years ago

Thank you for updating - glad to hear it is working.

kalimuthup commented 6 years ago

Hi Mark ,

Do you guys have any samples for mocking WCMPOJO classes for getpageproperties() and getslinghelper().

We extensivly use WCMUSE Pojo and we are facing few challenges in mocking these in built methods.

Regards, Prasad Kalimuthu

On Mar 1, 2018, at 3:26 PM, Mark Daugherty notifications@github.com wrote:

Thank you for updating - glad to hear it is working.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/OlsonDigital/prosper/issues/19#issuecomment-369752815, or mute the thread https://github.com/notifications/unsubscribe-auth/AQeyGSVw5eSOqltu0WUhMM5GemD8PMgFks5taHWIgaJpZM4SXyKj.

markdaugherty commented 6 years ago

We removed support for WCMUsePojo classes after version 5.1.0. However, you can take a look at the source for that version and see if there is something you can adapt for your usage:

https://github.com/OlsonDigital/prosper/tree/5.1.0