Author: psuchy
Date: 2012-08-31 04:54:00 -0400 (Fri, 31 Aug 2012)
New Revision: 43349
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/pom.xml
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/CheckSeamRuntimeTemplate.java
Log:
Mavenization - add pom.xml and testSuite for project part
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch 2012-08-31
08:54:00 UTC (rev 43349)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+<launchConfiguration
type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation"
value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location"
value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry
value="/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":${string_prompt:display
number:0}"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER"
value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR"
value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME"
value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND"
value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE"
value="org.jboss.tools.runtime.as.ui.bot.test.ProjectTestsSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"
value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
-consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="org.jboss.tools.runtime.as.ui.bot.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"
value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS"
value="-Xmx1024m -XX:MaxPermSize=256m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product"
value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/pom.xml
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/pom.xml
(rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/pom.xml 2012-08-31 08:54:00
UTC (rev 43349)
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools.runtime</groupId>
+ <artifactId>tests</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.as.ui.bot.test</groupId>
+ <artifactId>org.jboss.tools.runtime.as.ui.bot.test</artifactId>
+
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <requirementsDirectory>${project.build.directory}/requirements</requirementsDirectory>
+ <jboss-as-7>${requirementsDirectory}/jboss-as-7.1.1.Final/</jboss-as-7>
+ <jboss-seam-2.2>${requirementsDirectory}/jboss-seam-2.2.2.Final/</jboss-seam-2.2>
+ <jboss-seam-2.3>${requirementsDirectory}/jboss-seam-2.3.0.Beta1/</jboss-seam-2.3>
+ <test.class>org.jboss.tools.runtime.as.ui.bot.test.ProjectTestsSuite/</test.class>
+ <additionalSystemProperties></additionalSystemProperties>
+ <systemProperties>${additionalSystemProperties}</systemProperties>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>debug</id>
+ <properties>
+ <additionalSystemProperties>-Xdebug
-Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y</additionalSystemProperties>
+ </properties>
+ </profile>
+ </profiles>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>sonatype-public-repository</id>
+ <
url>https://oss.sonatype.org/content/groups/public</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install-as</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-dist</artifactId>
+ <version>7.1.1.Final</version>
+ <type>zip</type>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${requirementsDirectory}</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>maven-download-plugin</artifactId>
+ <version>1.0.0</version>
+ <executions>
+ <execution>
+ <id>install-seam-2.2.2.Final</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <
url>http://sourceforge.net/projects/jboss/files/JBoss%20Seam/2.2.2.Fin...
+ <unpack>true</unpack>
+ <md5>3bdb26921b1ebfb7222968657df95bb3</md5>
+ <outputDirectory>${requirementsDirectory}/</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-seam-2.3.0.Beta1</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <
url>http://sourceforge.net/projects/jboss/files/JBoss%20Seam/2.3.0.Bet...
+ <unpack>true</unpack>
+ <md5>85c2f188e1efe5291ba3aa1f3c0c22d0</md5>
+ <outputDirectory>${requirementsDirectory}/</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <useUIThread>false</useUIThread>
+ <testSuite>org.jboss.tools.runtime.as.ui.bot.test</testSuite>
+ <testClass>${test.class}</testClass>
+ <skip>${swtbot.test.skip}</skip>
+ <dependencies combine.children="append">
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.runtime.seam.detector.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.runtime.core.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.runtime.as.detector.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.seam.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>resources</outputDirectory>
+ <resources>
+ <resource>
+ <directory>resources/template</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>runtimes.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <resolver>p2</resolver>
+ <ignoreTychoRepositories>true</ignoreTychoRepositories>
+ <environments>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.apache.maven.plugins
+ </groupId>
+ <artifactId>
+ maven-dependency-plugin
+ </artifactId>
+ <versionRange>[2.1,)</versionRange>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java 2012-08-31
08:54:00 UTC (rev 43349)
@@ -0,0 +1,26 @@
+package org.jboss.tools.runtime.as.ui.bot.test;
+
+import org.jboss.tools.runtime.as.ui.bot.test.detector.RuntimeDuplications;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.ServerWithSeam;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.seam.seam22.CheckSeam22;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.seam.seam22.DetectSeam22;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.seam.seam23.CheckSeam23;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.seam.seam23.DetectSeam23;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.server.jboss7.DetectJBoss7;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.server.jboss7.OperateJBoss7;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({
+ DetectJBoss7.class,
+ OperateJBoss7.class,
+ DetectSeam22.class,
+ CheckSeam22.class,
+ DetectSeam23.class,
+ CheckSeam23.class
+})
+public class ProjectTestsSuite {
+
+}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-31
07:42:30 UTC (rev 43348)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-31
08:54:00 UTC (rev 43349)
@@ -1,11 +1,16 @@
package org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences;
+import java.awt.AWTException;
+import java.awt.Robot;
+import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactory;
import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
@@ -39,7 +44,18 @@
for (int i = 0; i < runtimesNumber; i++){
table.click(0, 0);
bot.button("Remove").click();
- KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.RIGHT, Keystrokes.CR,
Keystrokes.LF);
+ Robot robot = null;
+ try {
+ robot = new Robot();
+ } catch (AWTException e) {
+ e.printStackTrace();
+ }
+ robot.setAutoWaitForIdle(true);
+ //robot.keyPress(KeyEvent.VK_RIGHT);
+ //robot.keyRelease(KeyEvent.VK_RIGHT);
+ robot.keyPress(KeyEvent.VK_ENTER);
+ robot.keyRelease(KeyEvent.VK_ENTER);
+ //KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.RIGHT, Keystrokes.CR,
Keystrokes.LF);
bot.shell("Preferences").activate();
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/CheckSeamRuntimeTemplate.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/CheckSeamRuntimeTemplate.java 2012-08-31
07:42:30 UTC (rev 43348)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/CheckSeamRuntimeTemplate.java 2012-08-31
08:54:00 UTC (rev 43349)
@@ -23,5 +23,6 @@
@After
public void cleanup(){
removeAllSeamRuntimes();
+ assertSeamRuntimesNumber(0);
}
}