forked from marcesher/mxunit-ant
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
121 lines (85 loc) · 4.15 KB
/
build.xml
File metadata and controls
121 lines (85 loc) · 4.15 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="MXUnitTask" basedir="." default="main">
<target name="init">
<echo message="Attempting to include buildprops/${user.name}.properties for any property overrides" />
<property file="buildprops/${user.name}.properties" />
<property file="buildprops/build.properties" />
<path id="project.class.path">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
</target>
<target name="clean" description="Delete all generated files">
<delete dir="${mxunit.jar}" failonerror="false" />
</target>
<target name="compile" description="Compiles the Task" depends="clean,init">
<mkdir dir="${classes.dir}" />
<javac verbose="true" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="project.class.path" target="1.5" source="1.5" />
</target>
<target name="jar" description="JARs the Task" depends="compile">
<jar destfile="${mxunit.jar}" basedir="${classes.dir}">
<fileset dir="lib/httpclient" />
<!-- -->
</jar>
</target>
<target name="testErr" depends="compile,jar">
<echo>Run</echo>
<taskdef name="mxunittask" classname="org.mxunit.ant.MXUnitAntTask" classpath="mxunit-ant.jar" />
<mxunittask server="localhost" port="8500" verbose="true" errorProperty="my.err.prop" failureproperty="my.fail.prop">
<testcase name="mxunit.tests.samples.MyComponentTest" />
</mxunittask>
<echo>${my.fail.prop}</echo>
<mxunittask server="localhost" port="8500" verbose="true" errorProperty="my.err.prop" failureproperty="my.failure.prop">
<testcase name="mxunit.tests.framework.MyCFCTest" />
</mxunittask>
<echo>${my.failure.prop}</echo>
</target>
<target name="runTests" description="Test the MXUnit Task" depends="compile,jar">
<echo>Running tests</echo>
<!-- Run the ant-unit tests in ./tests-->
<ant dir="tests" />
</target>
<target name="use" description="Use the MXUnit Task" depends="jar">
<mkdir dir="${junit.out.dir.html}" />
<mkdir dir="${output.dir}" />
<!-- -->
<taskdef name="mxunittask" classname="org.mxunit.ant.MXUnitAntTask" classpath="${mxunit.jar}" />
<mxunittask server="localhost" port="8500" defaultrunner="" outputdir="${output.dir}" verbose="true" testResultsSummary="${testrestults.summary}" haltonerror="true" haltonfailure="false">
<directory remoteMethod="run" path="${component.path}\mxunit\tests\framework" packageName="mxunit.tests.framework" recurse="false" excludes="" />
<directory runner="/mxunit/runner/HttpAntRunner.cfc" remoteMethod="run" path="${component.path}\mxunit\tests\runner" packageName="mxunit.tests.runner" recurse="false" excludes="" />
<!--
<directory runner="/mxunit/runner/HttpAntRunner.cfc"
remoteMethod="run"
path="${component.path}\mxunit\samples"
packageName="mxunit.tests.samples"
recurse="false"
excludes="" />
<directory runner="/mxunit/runner/HttpAntRunner.cfc"
remoteMethod="run"
path="${component.path}\mxunit\tests\generator"
packageName="mxunit.tests.generator"
recurse="false"
excludes="" />
-->
</mxunittask>
</target>
<target name="main" depends="runTests" />
<target name="junitreport" depends="use" description="Create a report for the rest result">
<property file="${output.dir}/${testrestults.summary}" />
<echoproperties />
<mkdir dir="${junit.out.dir.html}" />
<junitreport todir="${junit.out.dir.html}">
<fileset dir="${output.dir}">
<include name="*.xml" />
</fileset>
<report format="frames" todir="${junit.out.dir.html}" styledir="${style.dir}" />
</junitreport>
</target>
<!-- Billy's stuff ....-->
<target name="browse" depends="junitreport">
<exec executable="C:\Program Files\Internet Explorer\iexplore.exe">
<arg value="C:\Documents and Settings\Billy\workspace\mxunit-ant\testresults\html\index.html" />
</exec>
</target>
</project>