Alors voila en details le contenu de mon projet "junitTest" afin que ca puisse aider à resoudre mon probleme:
arborescence projet:
junitTest
src:
com/mybusiness/action:
Processor.java
com/mybusiness/test:
ProcessorTest.java
AllTests.java ( suite de tests)
lib :
ant-junit-1.7.0.jar
junit-4.5.jar
build.xml
voiçi le contenu de mon build.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
<?xml version="1.0" encoding="UTF-8"?>
<project name="junitTest" default="junit-report" basedir=".">
<description> simple example build file </description>
<!-- set global properties for this build -->
<property name="src.dir" location="${basedir}/src"/>
<property name="classes.dir" location="${basedir}/classes"/>
<property name="junit.reports.dir" location="${basedir}/junit"/>
<property name="junit.includes" value="${src.dir}/**/*Test.java"/>
<property name="junit.excludes" value="${src.dir}/**/AllTests.java"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${classes.dir}"/>
<mkdir dir="${junit.reports.dir}/xml"/>
</target>
<target name="compile" depends="init" description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src.dir}" destdir="${classes.dir}">
<classpath>
<pathelement path="lib/junit-4.5.jar"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile" description="runs all junit test cases" >
<!-- Runs .class files from ${build} -->
<junit showoutput="yes" printsummary="on" haltonerror="no" haltonfailure="no">
<classpath>
<pathelement path="lib/junit-4.5.jar"/>
<pathelement location="${classes.dir}"/>
</classpath>
<batchtest todir="${junit.reports.dir}/xml">
<formatter type="xml"/>
<fileset dir="${src.dir}">
<include name="${junit.includes}"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="junit-report" depends="test" description="Generates JUnit HTML report" >
<junitreport todir="${junit.reports.dir}/xml">
<fileset dir="${junit.reports.dir}/xml">
<include name="*Test-*.xml"/>
</fileset>
<report format="frames" todir="${junit.reports.dir}"/>
<!-- <report format="noframes" styledir="xslt"/> -->
</junitreport>
</target>
<target name="clean" description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${classes.dir}"/>
<delete dir="${junit.reports.dir}"/>
</target>
</project> |
les tests sont bien ecrits et ca marche bien !
Donc voila , je crosi tout y est ! vous allez vous rendre compte de l'output generer qui est vide! et je compte sincerement sur votre aide pour me sortir de la
!
encore merci à tous!
Partager