08-15-2018 10:56 AM
Hi,
I am currently creating a CMIS 1.1 based client library (using apache chemistry) to query Alfresco to add, delete, update folders and documents. Please can you let me know how to write JUnit tests to test my API calls.
Is there a way to spin up a in memory alfresco instance to test out my client library that I am writing using CMIS 1.1.
Thanks
08-15-2018 02:24 PM
You can refer if the below url helps:
GitHub - gsdenys/junit-server-cmis: JUnit Runner for CMIS Server
08-21-2018 01:13 PM
Thanks a lot for the link Ranjeet. Is there a way to setup aspects using the runner? Do you have any examples to share as to how I can create aspects via the runner?
08-26-2018 11:18 PM
Thanks Ranjeet for the link. I am getting an error when I execute my runner, it is not able to start up jetty automatically. Did you have to do any further setup other than the steps outlined in the github page? Appreciate if you can let me know what could be the issue.
I raised the below query to help on the above
Thanks
08-27-2018 11:47 AM
Hi,
I had tested this quite long ago and just provided the github url for the same.
Will check it once i have time, meanwhile can you please provide the error you are getting.
08-28-2018 07:13 AM
I setup the runner as outlined in the github page. I have the dependency to the runner in my pom.xml . When I started my runner I got the below error.
Aug 27, 2018 4:06:43 AM org.eclipse.jetty.webapp.WebInfConfiguration getCanonicalNameForWebAppTmpDir
WARNING: Can't generate resourceBase as part of webapp tmp dir name: java.lang.IllegalStateException: No resourceBase or war set for context
Aug 27, 2018 4:06:43 AM org.eclipse.jetty.webapp.WebAppContext doStart
WARNING: Failed startup of context o.e.j.w.WebAppContext@2e4b8173{/cmis,null,null}
java.lang.IllegalStateException: No resourceBase or war set for context
08-27-2018 12:02 PM
For creation of site , you can use - REST call also:
curl command:
curl -X POST \
'http://localhost:8084/alfresco/api/-default-/public/alfresco/versions/1/sites?skipConfiguration=fals...' \
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: 5c8f33b2-bac9-498f-b1d3-c542eaf87e0f' \
-d '{
"id": "test8084site",
"title": "test8084site",
"description": "test8084site",
"visibility": "PUBLIC"
}'
Explore our Alfresco products with the links below. Use labels to filter content by product module.