Update of /cvsroot/appsunit/project/resources/archetype
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv11640/resources/archetype
Modified Files:
build.xml
Added Files:
README
Log Message:
Added junitpdfreport, added insructions.
--- NEW FILE: README ---
http://sourceforge.net/projects/appsunit/
Getting started:
-----------------
1. Required software
--------------------
You need the Oracle jdbc driver library (ojdbc14.jar) on your computer.
As the library is not open source, it's not distributed with this package.
The library can be downloaded from:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
You need java jdk 1.5 or higher, available from http://java.sun.com
You need Ant 1.7 or higher, available from http://ant.apache.org
2. configuration
----------------
Rename build.properties.sample to build.properties.
Edit build.properties with a text editor:
db.jar has to point to your ojdbc14.jar file
example: db.jar=c:/library_home/oracle/ojdbc14.jar
db.uri has to point to your Oracle Apps test instance's database.
example: db.uri=jdbc:oracle:thin:apps/3q4Q8@myserver:1521:ORAC
More info on the connect string is available on Oracle's web:
http://download-uk.oracle.com/docs/cd/B19306_01/java.102/b14355/basic.htm#i1006650
3. run the test
---------------
>From the project's root directory, run:
ant build test
Look for the pdf report in the build/test/testreport/pdf subdirectory.
Look for the html report in the build/test/testreport/html-noframes subdirectoy
Index: build.xml
===================================================================
RCS file: /cvsroot/appsunit/project/resources/archetype/build.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** build.xml 30 Oct 2006 11:07:59 -0000 1.3
--- build.xml 30 Oct 2006 21:40:58 -0000 1.4
***************
*** 1,4 ****
--- 1,7 ----
<?xml version="1.0" encoding="UTF-8"?>
<project name="Apps Unit Tests" default="all" basedir=".">
+
+ <import file="junitpdfreport/build-junitpdfreport.xml"/>
+
<property file="build.properties"/>
***************
*** 31,35 ****
<target name="test" description="Run the test scenarios" depends="build">
<mkdir dir="${test.result.dir}"/>
- <echo message="${db.uri}"/>
<junit printsummary="yes" fork="yes" forkmode="once" haltonfailure="no">
<sysproperty key="db.driver" value ="${db.driver}"/>
--- 34,37 ----
***************
*** 44,51 ****
<classpath refid="classpath"/>
</junit>
</target>
!
!
!
<target name="all" depends="init,build,test"
description="Run all targets">
--- 46,67 ----
<classpath refid="classpath"/>
</junit>
+ <replace dir="${test.result.dir}" token="${db.uri}" value="hidden">
+ <include name="**/TEST-*.xml"/>
+ </replace>
+ <mkdir dir="${test.report.dir}/html-noframes"/>
+ <junitreport todir="${test.report.dir}">
+ <fileset dir="${test.result.dir}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="noframes" todir="${test.report.dir}/html-noframes"/>
+ </junitreport>
+ <mkdir dir="${test.report.dir}/pdf"/>
+ <junitpdfreport todir="${test.report.dir}/pdf" styledir="default">
+ <fileset dir="${test.result.dir}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ </junitpdfreport>
</target>
!
<target name="all" depends="init,build,test"
description="Run all targets">
|