cancel
Showing results for 
Search instead for 
Did you mean: 

Unit testing Webscripts

koolalfdev
Champ in-the-making
Champ in-the-making
Hello,

I wanted if there is a way or an article referring to the way one can write unit tests for web scripts. I read that there is a framework available with the version 3.0, but was wondering if there is one testing framework for alfresco 2.1

Thanks.
1 REPLY 1

jbarmash
Champ in-the-making
Champ in-the-making
TestWebScriptServer can be used for this.  For 3.0 it has been enhanced to be more easily pluggable into unit testing frameworks, but in 2.1 you can still create an instance of it, submit requests to it, and then verify the results.  See wiki section here:
   http://wiki.alfresco.com/wiki/Web_Scripts#Unit_Test_Helper_Methods