blob: 42f8ec6183784a98f80b47f5f34e7e672e79e3aa [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project name="OFBiz - Test Tools Component" default="jar" basedir=".">
<import file="../../common.xml"/>
<!-- ================================================================== -->
<!-- Initialization of all property settings -->
<!-- ================================================================== -->
<property name="desc" value="Test Tools Component"/>
<property name="name" value="ofbiz-testtools"/>
<property name="ofbiz.home.dir" value="../.."/>
<path id="local.class.path">
<fileset dir="${lib.dir}" includes="*.jar"/>
<fileset dir="../base/lib" includes="*.jar"/>
<fileset dir="../base/lib/scripting" includes="*.jar"/>
<fileset dir="../base/lib/j2eespecs" includes="*.jar"/>
<fileset dir="../base/lib/commons" includes="*.jar"/>
<fileset dir="../base/build/lib" includes="*.jar"/>
<fileset dir="../entity/lib" includes="*.jar"/>
<fileset dir="../entity/build/lib" includes="*.jar"/>
<fileset dir="../security/build/lib" includes="*.jar"/>
<fileset dir="../service/lib" includes="*.jar"/>
<fileset dir="../service/build/lib" includes="*.jar"/>
<fileset dir="../minilang/build/lib" includes="*.jar"/>
<fileset dir="../webapp/lib" includes="*.jar"/>
</path>
<path id="runtime.class.path">
<fileset dir="${build.dir}/lib" includes="*.jar"/>
</path>
<target name="init">
<property name="lib.dir" value="lib"/>
<property name="selenium.lib.dir" value="${lib.dir}"/>
</target>
<target name="run-seleniumxml" depends="init, jar" description="Runs the selenium xml test cases">
<java classname="org.ofbiz.testtools.seleniumxml.SeleniumXml" fork="true">
<jvmarg value="-Dselenium.config=config/seleniumXml.properties"/>
<arg value="testdef/seleniumxml/example/example_testsuite.xml"/>
<classpath>
<path refid="runtime.class.path"/>
<path refid="local.class.path"/>
</classpath>
</java>
</target>
<target name="run-seleniumserver" depends="init, jar" description="Runs the selenium RC server">
<java jar="../../framework/testtools/lib/selenium-server.jar" fork="true">
<!-- arg value="-timeout 240"/ -->
<classpath>
<path refid="runtime.class.path"/>
<path refid="local.class.path"/>
</classpath>
<arg value="-timeout"/>
<arg value="240"/>
<arg value="-firefoxProfileTemplate"/>
<arg value="./config/firefox_profile"/>
</java>
</target>
<target name="install-seleniumxml" depends="init" description="Download the selenium files">
<!--
Quick way to download and extract the selenium-server.jar
If someone has a better way to do the same, please suggest !
-->
<get src="http://selenium.googlecode.com/files/selenium-remote-control-1.0.3.zip"
dest="${selenium.lib.dir}/selenium-remote-control-1.0.3.zip" usetimestamp="true" verbose="true"/>
<unzip src="${selenium.lib.dir}/selenium-remote-control-1.0.3.zip"
dest="${selenium.lib.dir}">
<patternset>
<include name="selenium-server-1.0.3/selenium-server.jar"/>
</patternset>
</unzip>
<move file="${selenium.lib.dir}/selenium-server-1.0.3/selenium-server.jar" todir="${selenium.lib.dir}"/>
<delete dir="${selenium.lib.dir}/selenium-server-1.0.3"/>
<delete file="${selenium.lib.dir}/selenium-remote-control-1.0.3.zip"/>
</target>
</project>