-
Notifications
You must be signed in to change notification settings - Fork 2
/
Reportbuild.xml
51 lines (37 loc) · 1.54 KB
/
Reportbuild.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
<?xml version="1.0"?>
<project name="TestNG" default="Generate-Report" basedir=".">
<!-- <target name="Clean">
<delete failonerror="false" dir="test-output" />
</target>
<target name="Create" depends="Clean">
<mkdir dir="test-output" />
</target> -->
<path id="classpath" description="Set the class path for the required jar">
<fileset dir="C:/Junit" includes="**/*.jar">
</fileset>
<pathelement location="C:/Junit/testng-6.8.jar" />
<pathelement location="C:/Junit/selenium-server-standalone-2.44.0.jar" />
<pathelement location="bin" />
</path>
<taskdef name="TestNG-Ant" classpathref="classpath" classname="org.testng.TestNGAntTask">
</taskdef>
<target name="Compile">
<javac classpathref="classpath" includeantruntime="true" srcdir="src" destdir="bin" includes="**/*.java" >
</javac>
</target>
<target name="report-testng" depends="Compile">
<TestNG-Ant outputdir="test-output1" haltonfailure="false" verbose="2" classpathref="classpath">
<xmlfileset dir="." includes="report-testng.xml"/>
</TestNG-Ant>
</target>
<target name="Run-Test" depends="report-testng">
<TestNG-Ant outputdir="test-output2" haltonfailure="false" verbose="2" classpathref="classpath">
<xmlfileset dir="." includes="report-testng_1.xml"/>
</TestNG-Ant>
</target>
<target name="Generate-Report" depends="Run-Test" description="Generate the Xlsx report using the testng-result.xml">
<java classpathref="classpath" classname="reports.ExcelReportGenerator" >
<arg value="test-output1,test-output2"/>
</java>
</target>
</project>