Alfresco ECM has a WS layer that implement all content management services as upload, search, transform, checkin/checkout, etc of any content stored in the repository. This WS layer enables to Business Application easier integration of content management functionalities. It is only necessary to invoke the Alfresco’s WS for the desired functionality. Alfresco has two types of WS set, one set implements WS of specific way and the other WS layer follows the CMIS standard, in the end, both layers offer the same services in an equivalent manner.
SoapUI Testing Alfresco Webservices
Design of Test Master Plan: Define the scope
For testing purposes, I recommend that you first define the scope of testing:
- What do you want to test?:
- How much you want to test?: type of test, i.e. regression, load test, etc. Then, you create a Test Suite with several test cases as many as you want to execute functionalities or WS.
Implement Test Suite with soapUI
- Identify URL/endpoints for each functionality to be tested
- Create test-cases for all functionality to be tested
- Automates each test case with soapUI by programming with groovy (soapUI scripting)
- Add indicators to measure the performance
Run Test Suite
Define the initial conditions to execute the test, for example, time of execution, ignore errors, etc.
soapUI Launch TestRunner settings
Alter a quick introduction, now will test Alfresco ECM, firstly, we will do queries to Alfresco’s Dictionary, after, and we will automate the creation of content in Alfresco.
Test Suite sample: “Testing Alfresco’s Dictionary Service”
soapUI Test Suite - Alfresco’s DictionaryService
Steps in the test suite:
startSession: We must be authenticated before accessing resources Alfresco. We must invoke the URL (
startSessionmethod/service) passing username/password, Alfresco should respond by sending a
StartSession SOAP request in Alfresco
StartSession SOAP response in Alfresco
Queries: getAssociations, getClasses, getProperties, …
For each SOAP query, we must identify SOAP endpoint (for example,
getAssociations) and method/service, then web have to pass a valid
GetAssociations SOAP request in Alfresco
This process we must repeat for each step (SOAP endpoint and method/service) that we identify in our tests.
endSession: For close session we have to invoke to
endSessionmethod using the initial
TICKET_IDcreated in step 1.
I have created two Test Suites with soapUI that you can import to workspace.
The first make several queries to Alfresco’s Dictionary (in this case you need to modify the standard content model of Alfresco or simply edit each test step of this soapUI project). The second test suite creates new content in the guest_home space and then transform to PDF.
- Download soapUI project for Alfresco v. 3.4d
I hope that is useful.