You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by bj...@apache.org on 2008/10/02 21:05:51 UTC
svn commit: r701213 - in
/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins:
org.apache.geronimo.testsuite.common/ org.apache.geronimo.testsuite.v20/
org.apache.geronimo.testsuite.v21/
org.apache.geronimo.testsuite.v21/src/main/java/org/apache/g...
Author: bjreed
Date: Thu Oct 2 12:05:50 2008
New Revision: 701213
URL: http://svn.apache.org/viewvc?rev=701213&view=rev
Log:
GERONIMODEVTOOLS-437. Changes to ant script so the build will fail when Abbot testcases fail
Added:
geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/library.xml (with props)
Modified:
geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml
geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java
geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java
geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/library.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/library.xml?rev=701213&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/library.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/library.xml Thu Oct 2 12:05:50 2008
@@ -0,0 +1,187 @@
+<?xml version="1.0"?>
+<!--
+ ~ 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.
+ -->
+
+<!-- @version $Rev$ $Date$ -->
+<project name="Library" default="usage" basedir=".">
+
+ <target name="usage">
+ <echo message="Please refer to the testframework.html in org.eclipse.test for instructions on usage." />
+ </target>
+
+ <target name="init">
+ <!--
+ Parameters:
+ (Mandatory)
+ data-dir - the directory for Eclipse to write its data
+ plugin-name - the name of the plugin to test
+ classname - the name of the test class
+
+ (Optional - overrides defaults set in script)
+ vmargs - a string containing arguments to pass to the VM.
+ extraVMargs - allows separate setting of VM args from separate caller.
+ timeout - overrides default test timeout value (in milliseconds).
+ test-output - overrides default output file produced from test run.
+ plugin-path - path to root of plug-in
+ useEclipseExe - property setting forces test to launch via eclipse executable.
+ junit-report-output - output directory for junit reports produced for specified classname.
+ -->
+
+ <tstamp>
+ <format property="TIMENOW" pattern="HHmmssSSSS"/>
+ </tstamp>
+ <!--property setting useEclipseExe launches tests using the eclipse executable-->
+ <condition property="launchTarget" value="eclipse-test">
+ <isset property="useEclipseExe" />
+ </condition>
+ <!--default launch target for launching tests-->
+ <property name="launchTarget" value="java-test" />
+ <property name="formatter" value="org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter"/>
+
+ <!--default heap sizes when running performance tests-->
+ <condition property="vmargs" value=" -Xms256M -Xmx256M">
+ <equals arg1="${test.target}" arg2="performance" />
+ </condition>
+ <property name="extraVMargs" value=""/>
+ <property name="plugin-path" value="" />
+ <property name="timeout" value="7200000" />
+ <property name="test-output" value="${eclipse-home}/${classname}.xml" />
+ <property name="junit-report-output" value="${eclipse-home}/results" />
+ <mkdir dir="${junit-report-output}"/>
+ </target>
+
+ <target name="core-test" description="Eclipse application used to launch HEADLESS plugin tests." depends="init">
+ <antcall target="${launchTarget}">
+ <param name="application" value="org.eclipse.test.coretestapplication"/>
+ </antcall>
+ </target>
+
+ <target name="ui-test" description="Eclipse application used to launch UI plugin tests." depends="init">
+ <antcall target="${launchTarget}">
+ <param name="application" value="org.eclipse.test.uitestapplication"/>
+ </antcall>
+ </target>
+
+ <target name="java-test">
+ <!--default vm args-->
+ <property name="vmargs" value=" -Xms40m -Xmx256m"/>
+
+ <!--set default jvm to use for testing-->
+ <property name="jvm" value="${java.home}/bin/java" />
+
+ <echo message="Running ${classname}. Result file: ${junit-report-output}/${classname}.xml."/>
+
+ <java fork="true" dir="." timeout="${timeout}" jvm="${jvm}" logError="true" failonerror="true"
+ classname="org.eclipse.core.launcher.Main" output="${junit-report-output}/${classname}.txt">
+ <classpath>
+ <fileset dir="${eclipse-home}/plugins">
+ <include name="org.eclipse.equinox.launcher_*.jar"/>
+ </fileset>
+ </classpath>
+ <arg line="-application ${application}"/>
+ <arg line="-data ${data-dir}"/>
+ <arg line="formatter=${formatter},${test-output}"/>
+ <arg line="-testPluginName ${plugin-name}"/>
+ <arg line="-className ${classname}"/>
+ <arg line="-os ${os}"/>
+ <arg line="-ws ${ws}"/>
+ <arg line="-arch ${arch}"/>
+ <arg line="-consolelog"/>
+ <jvmarg line="${vmargs} ${extraVMargs}"/>
+ <sysproperty key="PLUGIN_PATH" value="${plugin-path}"/>
+ </java>
+ <antcall target="collect-results" />
+ </target>
+
+ <target name="eclipse-test" description="Runs the specified classname as a plug-in test.">
+ <property name="vmargs" value="-Xms256m -Xmx512m"/>
+
+ <!--use -consolelog if launching a headless test-->
+ <condition property="consolelog" value="-consolelog">
+ <equals arg1="${application}" arg2="org.eclipse.test.coretestapplication"/>
+ </condition>
+ <property name="consolelog" value="" />
+
+ <!--
+ vm selection priority:
+ 1. user-specified java executable via outer Ant property setting of "jvm".
+ 2. java executable on path.
+ -->
+ <condition property="test-vm" value="-vm ${jvm}">
+ <isset property="jvm" />
+ </condition>
+ <property name="test-vm" value="" />
+
+ <!--ensure executable has execute permission-->
+ <chmod file="${eclipse-home}/eclipse" perm="ugo+rx"/>
+
+
+ <echo message="Running ${classname}. Result file: ${junit-report-output}/${classname}.xml."/>
+
+ <exec executable="${eclipse-home}/eclipse" dir="${eclipse-home}" timeout="${timeout}" logError="true" failonerror="false" output="${junit-report-output}/${classname}.txt">
+ <arg line="-data ${data-dir}"/>
+ <arg line="${test-vm}"/>
+ <arg line="-application ${application}"/>
+ <arg line="formatter=${formatter},${test-output}"/>
+ <arg line="-testPluginName ${plugin-name}"/>
+ <arg line="-className ${classname}"/>
+ <arg line="-nosplash"/>
+ <arg line="--launcher.suppressErrors"/>
+ <arg line="${consolelog}"/>
+ <arg line="-vmargs ${vmargs} ${extraVMargs} -DPLUGIN_PATH=${plugin-path}"/>
+ </exec>
+ <antcall target="collect-results" />
+ </target>
+
+ <target name="collect-results">
+ <dirname property="output-dir" file="${test-output}"/>
+ <basename property="output-file-name" file="${test-output}"/>
+ <junitreport todir="${junit-report-output}" tofile="${classname}.xml">
+ <fileset dir="${output-dir}">
+ <include name="${output-file-name}"/>
+ </fileset>
+ </junitreport>
+
+ <style style="${eclipse-home}/dropins/eclipse/plugins/org.eclipse.test/JUNIT.XSL"
+ basedir="${junit-report-output}"
+ includes="${classname}.result.xml"
+ destdir="${junit-report-output}" />
+
+ <!--save .log content and *.log content from configuration directory-->
+ <concat destfile="${junit-report-output}/${classname}.log">
+ <fileset dir="${eclipse-home}" includes="${data-dir}/.metadata/*.log"/>
+ <fileset dir="${eclipse-home}" includes="configuration/*.log"/>
+ </concat>
+ </target>
+
+ <target name="collect">
+ <!--
+ This target can be used to aggragate test runs from multiple test suites into a single report.
+
+ Parameters to this target:
+ includes - the names of the files to include
+ output-file - the name of the output file to produce
+ -->
+ <junitreport todir="." tofile="${output-file}">
+ <fileset dir=".">
+ <include name="${includes}"/>
+ </fileset>
+ </junitreport>
+ </target>
+
+</project>
+
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/library.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/library.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/library.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml?rev=701213&r1=701212&r2=701213&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml Thu Oct 2 12:05:50 2008
@@ -26,7 +26,7 @@
<property name="eclipse-home" value="${basedir}\..\.."/>
<property name="plugin-name" value="org.apache.geronimo.testsuite.v20"/>
<property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
+ value="${eclipse-home}/../../../plugins/org.apache.geronimo.testsuite.common/library.xml"/>
<!-- This target holds all initialization code that needs to be done for -->
<!-- all tests that are to be run. Initialization for individual tests -->
Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java?rev=701213&r1=701212&r2=701213&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java Thu Oct 2 12:05:50 2008
@@ -43,6 +43,7 @@
public void testEclipseUI()
{
+ boolean success = false;
try {
// About Eclipse Test Case. There are three Shell newShell, nextShell and nextNextShell
//used because we need to save the states for newShell and nextShell
@@ -53,8 +54,6 @@
Shell nextShell = aHelper.clickImageButton(newShell, "Apache.org - Geronimo v21 Server Tools Core Plug-in","About Eclipse Platform Features");
Shell nextNextShell = aHelper.clickButton(nextShell, "&Plug-in Details", "Feature Plug-ins");
aHelper.clickButton(nextNextShell, IDialogConstants.OK_LABEL);
- nextNextShell = aHelper.clickButton(nextShell, "&Columns...","Configure Columns");
- aHelper.clickButton(nextNextShell, IDialogConstants.OK_LABEL);
aHelper.clickButton(nextShell, IDialogConstants.OK_LABEL);
aHelper.clickButton(newShell, IDialogConstants.OK_LABEL);
@@ -74,10 +73,13 @@
//aHelper.waitForDialogDisposal(nextShell);
aHelper.clickButton(newShell, "&Next");
//aHelper.clickItem(newShell, "Geronimo v2.1 Server Adapter");*/
+
+ success = true;
}
catch(Exception e)
{
e.printStackTrace();
}
+ assertTrue (success);
}
}
Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java?rev=701213&r1=701212&r2=701213&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java Thu Oct 2 12:05:50 2008
@@ -54,21 +54,17 @@
workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
aHelper = new AbbotHelper (workbenchShell);
-
ServerTasks serverTasks = new ServerTasks(workbenchShell, aHelper, Constants.SERVER_V21 );
WorkbenchTasks workbenchTasks = new WorkbenchTasks(workbenchShell, aHelper);
// so we are sure that we are looking in the desired perspective
workbenchTasks.showJEEPerspective();
-
-
// create server from an installed instance
serverTasks.createServer();
serverTasks.startServer();
-
EclipseSelenium selenium = new EclipseSelenium();
selenium.start();
@@ -77,15 +73,13 @@
selenium.type("j_username", "system");
selenium.type("j_password", "manager");
selenium.click("submit");
-
-
+
serverTasks.stopServer();
// remove the server
serverTasks.removeServer();
-
- selenium.stop();
+ selenium.stop();
success = true;
}
@@ -94,5 +88,4 @@
}
assertTrue (success);
}
-
}
Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml?rev=701213&r1=701212&r2=701213&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml Thu Oct 2 12:05:50 2008
@@ -26,7 +26,7 @@
<property name="eclipse-home" value="${basedir}\..\.."/>
<property name="plugin-name" value="org.apache.geronimo.testsuite.v21"/>
<property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
+ value="${eclipse-home}/../../../plugins/org.apache.geronimo.testsuite.common/library.xml"/>
<!-- This target holds all initialization code that needs to be done for -->
<!-- all tests that are to be run. Initialization for individual tests -->