Testing the web script
It's now time to test the functionality of the web script we have just created. We basically want to make sure that the logic we have incorporated in the Java-backed controller is working as expected.
In order to test the web script, upload some content (say an image) in the Alfresco repository first. Make a note of its nodeid
. In order to get the nodeid
of uploaded content after the content is uploaded using Alfresco Share, just take the mouse pointer to the content name and then right-click on it and click on Copy link location. Paste this link somewhere in a text editor and copy the value after workspace://SpacesStore
; this forms the nodeid
. Now, create two users and give one of them consumer access and do not give any permission to the other user on this content. Make sure inherit permission is also unchecked.
Now, with any of the two users, start testing the web script.
Test case 1 – mandatory check
The nodeid
is a mandatory argument for the web script we created...