blob: c94d071f38319856f3fe4ae3accfcf3e3ef9236e [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<project name="adminweb" default="default" basedir=".">
<property file="build.properties"/>
<description>Builds, tests, and runs the GlassFish Admin GUI</description>
<!-- <import file="nbproject/build-impl.xml"/>-->
<target name="echo">
<echo message="Hello World"/>
</target>
<target name="sun-taskdef">
<taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask">
<classpath>
<pathelement location="${sun.appserver.antjar}" />
</classpath>
</taskdef>
<taskdef name="sun-appserv-undeploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask">
<classpath>
<pathelement location="${sun.appserver.antjar}" />
</classpath>
</taskdef>
</target>
<!--<env key="APPCPATH" path="${env.APS_HOME}/lib/testng.jar"/>-->
<path id="path2testng">
<pathelement location="../lib/testng-5.0-jdk15.jar"/>
</path>
<path id="class.path">
<fileset dir="${install.dir}/lib">
<include name="**/*.jar"/>
</fileset>
<pathelement location="classes"/>
</path>
<path id="test.classpath">
<!--<fileset dir="${install.dir}/lib">
<include name="**/*.jar"/>
</fileset>-->
<fileset dir="../../lib">
<include name="**/*.jar"/>
</fileset>
<pathelement location="./classes/test"/>
</path>
<taskdef name="testng"
classpathref="path2testng"
classname="org.testng.TestNGAntTask"/>
<!-- Generate the TestNG report -->
<target name="report">
<!--<delete dir="../../test-report"/>-->
<mkdir dir="../../test-report"/>
<junitreport todir="../../test-report">
<fileset dir="../../">
<include name="**/test-output/**/*.xml"/>
<exclude name="**/testng-failed.xml"/>
</fileset>
<report format="noframes" todir="../test-report"/>
</junitreport>
</target>
<target name="compile-tests"
description="compile the test ng example" depends="">
<delete dir="classes/test" failonerror="false"/>
<mkdir dir="classes/test"/>
<javac debug="true"
fork="true"
source="1.5"
classpathref="test.classpath"
srcdir="src/test"
destdir="classes/test"
/>
</target>
<target name="start">
<echo message="Starting Selenium Server"/>
<java jar="../../lib/selenium/selenium-server.jar" fork="true">
<arg line="-interactive"/>
</java>
</target>
<target name="run">
<echo message="=============Starting Selenium TestNG test at \n ${basedir} ============"/>
<mkdir dir="../test-output"/>
<testng outputdir="../test-output"
classpathref="test.classpath" groups="">
<classfileset dir="classes/test" includes="**/SeleniumTest.class"/>
<!--<xmlfileset dir="../../../" includes="testng.xml"/>-->
</testng>
<!--<antcall target="-post-test-run"/> -->
</target>
<target name="stop">
<get taskname="selenium-shutdown"
src="http://localhost:4444/selenium-server/driver/?cmd=shutDown"
dest="result.txt"
ignoreerrors="true"/>
<echo taskname="selenium-shutdown"
message="Errors during shutdown are expected"/>
</target>
<target name="dist">
<echo message="Save EAR/WAR/JAR file"/>
</target>
<target name="_start-selenium">
<java jar="../lib/selenium/${selenium-srvr-jar}" fork="true" spawn="true" />
<antcall target="_run-ua-tests" />
<get dest="${testreportdir}/results.txt"
src="${selenium-srvr-loc}/selenium-server/driver/?cmd=shutDown" />
</target>
</project>