Hi folks, after reading the wiki article about testing WebScripts (http://wiki.alfresco.com/wiki/3.0_Web_Scripts_Testing) I wanted to use mentioned practices in my own project. But I have a problem with required dependencies…
I want to write a junit testcase by extending org.alfresco.repo.web.scripts.BaseWebScriptTest, this class has a dependency to org.springframework.extensions.webscripts.TestWebScriptServer. I'm not able to resolve the dependency. I found spring-webscripts-1.0.0.CI-SNAPSHOT.jar in WEB-INF/libs folder of my Alfresco webapp. This jar includes the package org.springframework.extensions.webscripts but not the class TestWebScriptServer. I'm using Alfresco 3.3.
Has anyone tried to use JUnit testing of WebScripts and could please provide me help finding the needed jar?
I also struggled with this today. This is what I did
Checked out spring-surf source code and run maven build. in spring-webscripts/target directory, maven build created a jar file called spring-webscripts-1.0.0.CI-SNAPSHOT-tests.jar. TestWebScriptServer is in this jar.
This solved my problem, hopefully the same to you.