cancel
Showing results for 
Search instead for 
Did you mean: 

Unit Testing JavaScript based webscripts

kmartino
Champ in-the-making
Champ in-the-making
Hello,

I am looking for an example of a JUnitTest that exercises a JavaScript-based webscript.

3.0 Web Scripts Testing - AlfrescoWiki:
http://wiki.alfresco.com/wiki/3.0_Web_Scripts_Testing

Shows a Java-backed example.  Are there any for JavaScript that someone can share?

Thank you,

Karl
1 REPLY 1

mrogers
Star Contributor
Star Contributor
If you look at the source code of the "Remote API" project you will find unit tests for web scripts regardless of how they are implemented.      Search for *Test.java containing the word "GET".

There's also a few examples of testing the java script interfaces.    Basically you get a Junit test to run a piece of Java Script that performs the test.