cancel
Showing results for 
Search instead for 
Did you mean: 

Unit test for Share webscripts

muralidharand
Star Contributor
Star Contributor
I created a unit test method to test my share webscript, by extending BaseWebScriptTest. 
During the unit test startup, the Alfresco repo application is started  and share application is not started.
When I'm calling sendRequest() method , the request goes to the alfresco repo application and not for the share application.
Moreoever BaseWebScriptTest.getServer() method returns TestWebScriptRepoServer only.

Is there any way, where we can get TestWebScriptServer to test the share application?
So, I want to know, How I can start the share application for Unit testing and how I can to do unit test Share webscripts?
1 REPLY 1

muralidharand
Star Contributor
Star Contributor
I got the below information from Axel.

Thanks Axel.

Hello Murali,

the only idea I have regarding this would be to re-implement the BaseWebScriptTest for Share specifically, which would end up starting a "selective base repository configuration" (services required for the specific test) with the addition of necessary Share framework components. Not quite a trivial task…
We ourselves don't and don't intend to use unit tests for Share functionality, as the effort required to achieve meaningful tests and an adequate test coverage far outweigh the benefits. Automated UI testing is our method of choice here.

Regards
Axel