Clean up server tests

- move from shell script to Ant
- update TestNG and Mockito to latest versions
This commit is contained in:
Tom Morris 2013-06-11 19:44:58 -04:00
parent 067fcacec7
commit e1bea25c72
6 changed files with 16 additions and 17 deletions

View File

@ -51,8 +51,8 @@
<classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-core-1.0.jar"/> <classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-core-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-spreadsheet-3.0.jar"/> <classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-spreadsheet-3.0.jar"/>
<classpathentry exported="true" kind="lib" path="main/webapp/WEB-INF/lib/jsoup-1.4.1.jar"/> <classpathentry exported="true" kind="lib" path="main/webapp/WEB-INF/lib/jsoup-1.4.1.jar"/>
<classpathentry exported="true" kind="lib" path="main/tests/server/lib/mockito-all-1.8.4.jar"/> <classpathentry exported="true" kind="lib" path="main/tests/server/lib/mockito-all-1.9.5.jar"/>
<classpathentry exported="true" kind="lib" path="main/tests/server/lib/testng-5.12.1.jar"/> <classpathentry exported="true" kind="lib" path="main/tests/server/lib/testng-6.8.jar"/>
<classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-docs-3.0.jar"/> <classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-docs-3.0.jar"/>
<classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-docs-meta-3.0.jar"/> <classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-docs-meta-3.0.jar"/>
<classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-media-1.0.jar"/> <classpathentry exported="true" kind="lib" path="extensions/gdata/module/MOD-INF/lib/gdata-media-1.0.jar"/>

View File

@ -88,6 +88,9 @@
<path id="tests.class.path"> <path id="tests.class.path">
<path refid="webapp.class.path"/> <path refid="webapp.class.path"/>
<path refid="server.class.path"/>
<pathelement location="${server.tests.classes.dir}"/>
<pathelement location="${server.tests.lib.dir}/testng-6.8.jar"/>
<fileset dir="${server.tests.lib.dir}"> <fileset dir="${server.tests.lib.dir}">
<include name="**/*.jar" /> <include name="**/*.jar" />
</fileset> </fileset>
@ -168,6 +171,16 @@
<target name="build_broker" depends="build_broker_core, build_broker_appengine"/> <target name="build_broker" depends="build_broker_core, build_broker_appengine"/>
<taskdef resource="testngtasks" classpath="${server.tests.lib.dir}/testng-6.8.jar"/>
<mkdir dir="${build.dir}/server_tests"/>
<target name="server_test" depends="build_tests">
<testng workingdir="${build.dir}/server_tests"
listener="org.testng.reporters.DotTestListener" excludedgroups="broken"
classpathref="tests.class.path">
<xmlfileset file="${server.tests.dir}/conf/tests.xml"/>
</testng>
</target>
<!-- ================================================================== --> <!-- ================================================================== -->
<target name="prepare_jar"> <target name="prepare_jar">

Binary file not shown.

16
refine
View File

@ -623,21 +623,7 @@ ui_test() {
} }
server_test() { server_test() {
ant build_tests ant server_test
echo ""
CLASSPATH="$REFINE_TEST_DIR/server/classes${SEP}$REFINE_WEBAPP/WEB-INF/classes${SEP}$REFINE_CLASSES_DIR${SEP}$REFINE_TEST_DIR/server/lib/*${SEP}$REFINE_LIB_DIR/*${SEP}$REFINE_WEBAPP/WEB-INF/lib/*"
if [ -z "$1" ] ; then
TESTS="-excludegroups broken $REFINE_TEST_DIR/server/conf/tests.xml"
else
TESTS="-testclass $1"
fi
RUN_CMD="$JAVA -cp $CLASSPATH $OPTS org.testng.TestNG -d $REFINE_BUILD_DIR/server_tests -listener org.testng.reporters.DotTestListener $TESTS"
#echo "$RUN_CMD"
#echo ""
$RUN_CMD || error "Failed passing server tests" $RUN_CMD || error "Failed passing server tests"
} }