mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM Build Scripts and Tests:
* moved RM tests into separate folder structure * updated Gradle scripts with test source locations and dependancies .. 'gradlew test' will now attempt to execute the unit tests (even if they fail!) * eclipse project dependancies updated so unit tests execute within the RM eclipse project * TODO get the unit tests working reliabily! (still lots of refactoring of old tests to do) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@35093 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
21
build.gradle
21
build.gradle
@@ -15,6 +15,16 @@ task wrapper(type: Wrapper) {
|
||||
gradleVersion = '1.0-milestone-8'
|
||||
}
|
||||
|
||||
task downloadAlfresco << {
|
||||
|
||||
def address = "https://bamboo.alfresco.com/bamboo/artifact/ALF-ENTERPRISEV40/JOB1/build-891/ALL/alfresco-enterprise-4.0.1.zip?os_authType=basic&os_username=rwetherall&os_password=31vegaleg"
|
||||
|
||||
def file = new FileOutputStream(file('alfresco.zip'))
|
||||
def out = new BufferedOutputStream(file)
|
||||
out << new URL(address).openStream()
|
||||
out.close()
|
||||
}
|
||||
|
||||
/** Subproject configuration */
|
||||
subprojects {
|
||||
|
||||
@@ -25,10 +35,13 @@ subprojects {
|
||||
|
||||
explodedDepsDir = 'explodedDeps'
|
||||
explodedLibsDir = "${explodedDepsDir}/lib"
|
||||
explodedConfigDir = "${explodedDepsDir}/config"
|
||||
buildDistDir = 'build/dist'
|
||||
buildLibDir = 'build/libs'
|
||||
sourceJavaDir = 'source/java'
|
||||
sourceWebDir = 'source/web'
|
||||
testJavaDir = 'test/java'
|
||||
testResourceDir = 'test/resource'
|
||||
configDir = 'config'
|
||||
configModuleDir = "config/alfresco/module/${moduleid}"
|
||||
moduleProperties = 'module.properties'
|
||||
@@ -44,6 +57,14 @@ subprojects {
|
||||
srcDir sourceJavaDir
|
||||
}
|
||||
}
|
||||
test {
|
||||
java {
|
||||
srcDir testJavaDir
|
||||
}
|
||||
resources {
|
||||
srcDir testResourceDir
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="source/java"/>
|
||||
<classpathentry kind="src" path="test/java"/>
|
||||
<classpathentry kind="src" path="test/resources"/>
|
||||
<classpathentry kind="src" path="explodedDeps/config"/>
|
||||
<classpathentry kind="src" path="config"/>
|
||||
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
@@ -277,5 +279,6 @@
|
||||
<classpathentry exported="true" kind="lib" path="C:/mywork/projects/rmhead/code/rm-server/explodedDeps/lib/xpp3-1.1.3_8.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="C:/mywork/projects/rmhead/code/rm-server/explodedDeps/lib/xstream-1.2.2.jar"/>
|
||||
<classpathentry kind="lib" path="libs/spring-webscripts-1.0.0-tests.jar"/>
|
||||
<classpathentry kind="lib" path="libs/postgresql-9.0-801.jdbc4.jar"/>
|
||||
<classpathentry kind="output" path="build/classes"/>
|
||||
</classpath>
|
||||
|
@@ -1,5 +1,26 @@
|
||||
dependencies {
|
||||
|
||||
compile fileTree(dir: 'libs', include: '*.jar')
|
||||
compile 'javax.servlet:servlet-api:2.5'
|
||||
compile 'org.springframework:spring-test:2.5'
|
||||
|
||||
testCompile 'org.springframework:spring-test:2.5'
|
||||
|
||||
testRuntime files(explodedConfigDir)
|
||||
testRuntime files(configDir)
|
||||
}
|
||||
|
||||
test {
|
||||
//makes the standard streams (err and out) visible at console when running tests
|
||||
testLogging.showStandardStreams = true
|
||||
|
||||
//tweaking memory settings for the forked vm that runs tests
|
||||
jvmArgs '-Xms256M', '-Xmx1024M', '-XX:MaxPermSize=256M'
|
||||
|
||||
//listening to test execution events
|
||||
beforeTest { descriptor ->
|
||||
logger.lifecycle("Running test: " + descriptor)
|
||||
}
|
||||
onOutput { descriptor, event ->
|
||||
logger.lifecycle(event.message)
|
||||
}
|
||||
}
|
BIN
rm-server/libs/postgresql-9.0-801.jdbc4.jar
Normal file
BIN
rm-server/libs/postgresql-9.0-801.jdbc4.jar
Normal file
Binary file not shown.
@@ -63,7 +63,7 @@ public class RecordsManagementActionServiceImplTest extends TestCase
|
||||
{
|
||||
private static final String[] CONFIG_LOCATIONS = new String[] {
|
||||
"classpath:alfresco/application-context.xml",
|
||||
"classpath:org/alfresco/module/org_alfresco_module_rm/test/util/test-context.xml"};
|
||||
"classpath:test-context.xml"};
|
||||
|
||||
private ApplicationContext ctx;
|
||||
|
@@ -77,7 +77,7 @@ public abstract class BaseRMTestCase extends RetryingTransactionHelperTestCase
|
||||
protected static final String[] CONFIG_LOCATIONS = new String[]
|
||||
{
|
||||
"classpath:alfresco/application-context.xml",
|
||||
"classpath:org/alfresco/module/org_alfresco_module_rm/test/util/test-context.xml"
|
||||
"classpath:test-context.xml"
|
||||
};
|
||||
protected ApplicationContext applicationContext;
|
||||
|
@@ -102,7 +102,7 @@ public class TestUtilities implements RecordsManagementModel
|
||||
// Do the data load into the the provided filePlan node reference
|
||||
// TODO ...
|
||||
InputStream is = TestUtilities.class.getClassLoader().getResourceAsStream(
|
||||
"alfresco/module/org_alfresco_module_rm/bootstrap/DODExampleFilePlan.xml");
|
||||
"alfresco/module/org_alfresco_module_rm/dod5015/DODExampleFilePlan.xml");
|
||||
//"alfresco/module/org_alfresco_module_rm/bootstrap/temp.xml");
|
||||
Assert.assertNotNull("The DODExampleFilePlan.xml import file could not be found", is);
|
||||
Reader viewReader = new InputStreamReader(is);
|
@@ -117,7 +117,7 @@ public class RmRestApiTest extends BaseWebScriptTest implements RecordsManagemen
|
||||
@Override
|
||||
protected void setUp() throws Exception
|
||||
{
|
||||
setCustomContext("classpath:org/alfresco/module/org_alfresco_module_rm/test/util/test-context.xml");
|
||||
setCustomContext("classpath:test-context.xml");
|
||||
|
||||
super.setUp();
|
||||
this.namespaceService = (NamespaceService) getServer().getApplicationContext().getBean("NamespaceService");
|
@@ -7,7 +7,7 @@
|
||||
<bean id="org_alfresco_module_dod5015_rmTestdictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
|
||||
<property name="models">
|
||||
<list>
|
||||
<value>org/alfresco/module/org_alfresco_module_rm/test/util/test-model.xml</value>
|
||||
<value>test-model.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
Reference in New Issue
Block a user