AnsweredAssumed Answered

Unit testing Share WebScripts?

Question asked by nickburch on Feb 8, 2013
Latest reply on Nov 7, 2013 by ddraper
To test my WebScripts that live on the Repository side, I've been following the approach on the <a href="">WebScript Testing wiki page</a>. This involves having your test class extend from BaseWebScriptTest. Apart for missing a few of the nice bits of JUnit 4 Rules that the pure-service unit test seem to have available to them, it works fine.

Now I find myself wanting to unit test some WebScripts that live on the Share tier. BaseWebScriptTest doesn't seem to be an option, as that automatically brings up the Repository web application, and I need to test my WebScript in Share. I've tried looking at the Alfresco source tree, but I couldn't seem to track down any WebScript unit tests targetting the Share tier.

Is there a recommended way to do this? Is there a different class I can extend from? Do I need to subclass something like BaseWebScriptTest and try to load the Share context files instead? Is there anything in Surf that'll help?