-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
58 lines (52 loc) · 2.2 KB
/
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
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="salesforce" default="ui-test">
<property name="selenide.browser" value="chrome"/>
<target name="install-ivy">
<delete dir="build/lib"/>
<mkdir dir="build/lib"/>
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.5.0/ivy-2.5.0.jar" dest="build/lib/ivy.jar" usetimestamp="true"/>
<path id="ivy.lib.path">
<fileset dir="build/lib" includes="ivy.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<target name="dependencies" depends="install-ivy">
<ivy:retrieve pattern="build/lib/[artifact]-[revision]-[classifier].[ext]" symlink="true" overwriteMode="newer"/>
<ivy:cachepath pathid="test.path"/>
</target>
<target name="compile-uitests" depends="dependencies">
<delete dir="build/classes/uitest"/>
<mkdir dir="build/classes/uitest"/>
<javac srcdir="uitest" destdir="build/classes/uitest" encoding="UTF-8" deprecation="yes">
<classpath>
<path refid="test.path"/>
</classpath>
</javac>
<copy todir="build/classes/uitest">
<fileset dir="uitest">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="ui-test" depends="compile-uitests">
<delete dir="build/ui-test-results"/>
<mkdir dir="build/ui-test-results"/>
<junit printsummary="yes" haltonfailure="false" failureproperty="uitests-failed" fork="true">
<classpath>
<path refid="test.path"/>
<path path="build/classes/uitest"/>
</classpath>
<batchtest fork="yes" todir="build/ui-test-results">
<fileset dir="uitest">
<include name="org/selenide/examples/**/*Test.java"/>
</fileset>
<formatter type="xml"/>
<formatter type="plain" usefile="false"/>
</batchtest>
<sysproperty key="salesforce.username" value="${salesforce.username}"/>
<sysproperty key="salesforce.password" value="${salesforce.password}"/>
<sysproperty key="selenide.browser" value="${selenide.browser}"/>
<sysproperty key="BUILD_URL" value="${BUILD_URL}"/>
</junit>
<fail if="uitests-failed"/>
</target>
</project>