Dependencies for WebScript test

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2011 12:18 PM
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?
Thanks alot of help and kind regards,
Martin
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?
Thanks alot of help and kind regards,
Martin
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2011 12:35 PM
Hello,
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.
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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 01:13 PM
Also you can add to your pom this to resolve your dependency:
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-webscripts</artifactId>
<version>${dependency.surf.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>commons-collections</artifactId>
<groupId>commons-collections</groupId>
</exclusion>
</exclusions>
</dependency>
source:
https://maven.alfresco.com/nexus/content/repositories/releases/org/alfresco/alfresco-remote-api/4.2....
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-webscripts</artifactId>
<version>${dependency.surf.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>commons-collections</artifactId>
<groupId>commons-collections</groupId>
</exclusion>
</exclusions>
</dependency>
source:
https://maven.alfresco.com/nexus/content/repositories/releases/org/alfresco/alfresco-remote-api/4.2....
