| 1 |
d2a8c3fd
|
Marc NICOLAS
|
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
|
|
|
| 3 |
|
|
|
| 4 |
|
|
|
| 5 |
|
|
|
| 6 |
|
|
|
| 7 |
|
|
|
| 8 |
|
|
|
| 9 |
|
|
|
| 10 |
|
|
|
| 11 |
|
|
|
| 12 |
|
|
|
| 13 |
|
|
|
| 14 |
|
|
|
| 15 |
|
|
|
| 16 |
|
|
|
| 17 |
|
|
<project name="TestNG" default="all" basedir=".">
|
| 18 |
|
|
|
| 19 |
|
|
|
| 20 |
|
|
|
| 21 |
|
|
|
| 22 |
|
|
|
| 23 |
|
|
<property file="build.properties" />
|
| 24 |
|
|
|
| 25 |
|
|
<property name="src.dir" location="src" />
|
| 26 |
|
|
<property name="test.src.dir" location="src/test"/>
|
| 27 |
|
|
<property name="build.dir" location="bin"/>
|
| 28 |
|
|
<property name="lib.dir" location="lib"/>
|
| 29 |
|
|
<property name="res.dir" location="res"/>
|
| 30 |
|
|
<property name="scenario.dir" location="res/scenario"/>
|
| 31 |
|
|
<property name="test.report.dir" location="report"/>
|
| 32 |
|
|
<property name="test.nicereport.dir" location="nicereport"/>
|
| 33 |
|
|
<property name="javac.debug" value="on"/>
|
| 34 |
|
|
|
| 35 |
|
|
<import file="../fr.cnes.sitools.core/sitools.userlibraries.ant.xml" optional="true" />
|
| 36 |
|
|
|
| 37 |
|
|
<path id="cots.dir">
|
| 38 |
|
|
<fileset dir="${cots.dir}/${testng.dir}" includes="*.jar" />
|
| 39 |
|
|
</path>
|
| 40 |
|
|
|
| 41 |
|
|
<path id="test">
|
| 42 |
|
|
<fileset dir="${test.src.dir}" includes="*.java" />
|
| 43 |
|
|
</path>
|
| 44 |
|
|
|
| 45 |
|
|
<path id="cpath">
|
| 46 |
|
|
<path refid="cots.dir" />
|
| 47 |
|
|
<path refid="test"/>
|
| 48 |
|
|
|
| 49 |
|
|
<pathelement path="${build.dir}" />
|
| 50 |
|
|
</path>
|
| 51 |
|
|
|
| 52 |
|
|
<target name="clean" description="Nettoyage des repertoires">
|
| 53 |
|
|
<delete dir="${build.dir}" />
|
| 54 |
|
|
<delete dir="${test.report.dir}" />
|
| 55 |
|
|
<delete dir="${test.nicereport.dir}" />
|
| 56 |
|
|
</target>
|
| 57 |
|
|
|
| 58 |
|
|
|
| 59 |
|
|
<target name="init">
|
| 60 |
|
|
|
| 61 |
|
|
<tstamp/>
|
| 62 |
|
|
<mkdir dir="${build.dir}" />
|
| 63 |
|
|
<mkdir dir="${test.report.dir}" />
|
| 64 |
|
|
<mkdir dir="${test.nicereport.dir}" />
|
| 65 |
|
|
</target>
|
| 66 |
|
|
|
| 67 |
|
|
<target name="compile" depends="init" description="Compilation du code">
|
| 68 |
|
|
<javac includeantruntime="false"
|
| 69 |
|
|
srcdir="${src.dir}"
|
| 70 |
|
|
destdir="${build.dir}"
|
| 71 |
|
|
classpathref="cpath"
|
| 72 |
|
|
debug="${javac.debug}"/>
|
| 73 |
|
|
</target>
|
| 74 |
|
|
|
| 75 |
|
|
|
| 76 |
|
|
<taskdef resource="testngtasks" classpathref="cots.dir"/>
|
| 77 |
|
|
|
| 78 |
|
|
<target name="test" depends="compile" description="Lancement des tests - Administration">
|
| 79 |
|
|
<echo message="args: -Dselenium.host=${selenium.host} -Dselenium.port=${selenium.port} -Dselenium.env=${selenium.env} -Dwebapp.url=${webapp.url}"/>
|
| 80 |
|
|
<testng
|
| 81 |
|
|
classpathref="cpath"
|
| 82 |
|
|
outputDir="${test.report.dir}"
|
| 83 |
|
|
haltOnfailure="true">
|
| 84 |
|
|
|
| 85 |
|
|
|
| 86 |
|
|
|
| 87 |
|
|
|
| 88 |
|
|
|
| 89 |
|
|
|
| 90 |
|
|
<xmlfileset dir="${scenario.dir}/admin" includes="sitoolsTests.xml"/>
|
| 91 |
|
|
|
| 92 |
|
|
|
| 93 |
|
|
|
| 94 |
|
|
|
| 95 |
|
|
|
| 96 |
|
|
</testng>
|
| 97 |
|
|
</target>
|
| 98 |
|
|
|
| 99 |
|
|
<target name="rapport" description="Generation des rapports graphiques">
|
| 100 |
|
|
<mkdir dir="${test.nicereport.dir}"/>
|
| 101 |
|
|
<xslt in="${test.report.dir}/testng-results.xml"
|
| 102 |
|
|
out="${test.nicereport.dir}/index.html"
|
| 103 |
|
|
style="${cots.dir}/${testng.dir}/testng-results.xsl"
|
| 104 |
|
|
force="yes" processor="SaxonLiaison">
|
| 105 |
|
|
<param name="testNgXslt.outputDir" expression="${test.nicereport.dir}"/>
|
| 106 |
|
|
<param name="testNgXslt.showRuntimeTotals" expression="true"/>
|
| 107 |
|
|
<param name="testNgXslt.testDetailsFilter" expression="FAIL,PASS,SKIP"/>
|
| 108 |
|
|
<classpath refid="cots.dir"/>
|
| 109 |
|
|
</xslt>
|
| 110 |
|
|
</target>
|
| 111 |
|
|
|
| 112 |
|
|
<target name="all" depends="test,rapport"/>
|
| 113 |
|
|
|
| 114 |
|
|
</project> |