JBoss Tools SVN: r40331 - in trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test: src/org/jboss/tools/hb/ui/bot/suite and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-04-19 06:40:33 -0400 (Thu, 19 Apr 2012)
New Revision: 40331
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/AntGeneration.launch
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/AntGenerationSuite.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ant/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ant/ExportAntCodeGenerationTest.java
Log:
Added initial version of Export Ant Code Generation script into HB ui bot test suite
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/AntGeneration.launch
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/AntGeneration.launch (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/AntGeneration.launch 2012-04-19 10:40:33 UTC (rev 40331)
@@ -0,0 +1,43 @@
+<?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.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/AntGenerationSuite.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=":1"/>
+</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.hb.ui.bot.suite.AntGenerationSuite"/>
+<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.hibernate.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="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M -Dusage_reporting_enabled=false -Dtest.configurations.dir=/home/jpeterka/etc/hb"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
+<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>
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/AntGeneration.launch
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/AntGenerationSuite.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/AntGenerationSuite.java (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/AntGenerationSuite.java 2012-04-19 10:40:33 UTC (rev 40331)
@@ -0,0 +1,12 @@
+package org.jboss.tools.hb.ui.bot.suite;
+
+import org.jboss.tools.hb.ui.bot.test.ant.ExportAntCodeGenerationTest;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+(a)RunWith(RequirementAwareSuite.class)
+(a)SuiteClasses({ExportAntCodeGenerationTest.class})
+public class AntGenerationSuite {
+
+}
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/AntGenerationSuite.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ant/ExportAntCodeGenerationTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ant/ExportAntCodeGenerationTest.java (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ant/ExportAntCodeGenerationTest.java 2012-04-19 10:40:33 UTC (rev 40331)
@@ -0,0 +1,70 @@
+package org.jboss.tools.hb.ui.bot.test.ant;
+
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellIsActive;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.jboss.tools.hb.ui.bot.common.ProjectExplorer;
+import org.jboss.tools.hb.ui.bot.common.Tree;
+import org.jboss.tools.hb.ui.bot.test.HibernateBaseTest;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTOpenExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+/**
+ * Hibernate export ant code generation ui bot test
+ *
+ * @author jpeterka
+ *
+ */
+@Require(db = @DB, clearProjects = true, perspective = "Hibernate")
+public class ExportAntCodeGenerationTest extends HibernateBaseTest {
+ final String prjName = "hibernate35";
+ final String genCfg = "hb35hsqldb";
+ final String antCfg = "build.hb.xml";
+
+ @Test
+ public void hibernateCodeGeneration() {
+ importTestProject("/resources/prj/hibernatelib");
+ importTestProject("/resources/prj/hibernate35");
+ exportAntCodeGeneration();
+ checkGeneratedAntcode();
+ }
+
+ private void exportAntCodeGeneration() {
+ SWTBotExt bot = new SWTBotExt();
+ SWTOpenExt open = new SWTOpenExt(bot);
+ SWTBotView view = open
+ .viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ Tree.select(view.bot(), prjName);
+ ContextMenuHelper.clickContextMenu(view.bot().tree(), "Export...");
+
+ String st1 = "Export";
+ bot.waitUntil(shellIsActive(st1));
+ SWTBotShell shell = bot.shell(st1);
+ Tree.select(shell.bot(), "Hibernate", "Ant Code Generation");
+ shell.bot().button(IDELabel.Button.NEXT).click();
+
+ String st2 = "Export Hibernate Code Generation Configuration to Ant Script";
+ bot.waitUntil(shellIsActive(st2));
+ SWTBotShell shell2 = bot.shell(st2);
+
+ shell2.bot()
+ .comboBoxWithLabel("Hibernate Code Generation Configurations:")
+ .setSelection(genCfg);
+ shell2.bot().textWithLabel("File name:").setText(antCfg);
+ shell2.bot().button(IDELabel.Button.FINISH).click();
+
+ bot.waitForNumberOfShells(1);
+ }
+
+ private void checkGeneratedAntcode() {
+ ProjectExplorer.open(prjName, antCfg);
+ }
+
+}
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/ant/ExportAntCodeGenerationTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 11 months
JBoss Tools SVN: r40330 - trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-04-19 05:52:44 -0400 (Thu, 19 Apr 2012)
New Revision: 40330
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/pom.xml
Log:
Created support for workspace preparation.
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch 2012-04-19 09:52:44 UTC (rev 40330)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
+<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
+<stringAttribute key="M2_GOALS" value="validate"/>
+<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
+<booleanAttribute key="M2_OFFLINE" value="false"/>
+<stringAttribute key="M2_PROFILES" value=""/>
+<listAttribute key="M2_PROPERTIES">
+<listEntry value="jboss-as-7-1=${folder_prompt:JBoss AS 7.1 installation folder}"/>
+</listAttribute>
+<stringAttribute key="M2_RUNTIME" value="/home/ljelinko/programs/apache-maven-3.0.3"/>
+<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
+<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="/home/ljelinko/work/workspaces/jboss-tools/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace"/>
+</launchConfiguration>
Modified: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/pom.xml
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/pom.xml 2012-04-19 09:51:55 UTC (rev 40329)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/pom.xml 2012-04-19 09:52:44 UTC (rev 40330)
@@ -1,21 +1,39 @@
<?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">
-
+<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">
+
<groupId>org.jboss.tools.runtime.as.ui.bot.test</groupId>
<artifactId>prepare.workspace</artifactId>
<version>0.0.0-SNAPSHOT</version>
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
<build>
- <resources>
- <resource>
- <directory>../../resources/template</directory>
- <filtering>true</filtering>
- <includes>
- <include>runtimes.properties</include>
- </includes>
- </resource>
- </resources>
- <outputDirectory>../../resources</outputDirectory>
- </build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>validate</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>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
13 years, 11 months
JBoss Tools SVN: r40329 - in trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources: template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-04-19 05:51:55 -0400 (Thu, 19 Apr 2012)
New Revision: 40329
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/template/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/template/runtimes.properties
Log:
Created configuration template
Copied: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/template/runtimes.properties (from rev 40326, trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/runtimes.properties)
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/template/runtimes.properties (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/template/runtimes.properties 2012-04-19 09:51:55 UTC (rev 40329)
@@ -0,0 +1 @@
+jboss-as-7.1.0.Final=${jboss-as-7-1}
\ No newline at end of file
13 years, 11 months
JBoss Tools SVN: r40328 - trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-04-19 05:47:08 -0400 (Thu, 19 Apr 2012)
New Revision: 40328
Removed:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/runtimes.properties
Log:
Deleted resource that should not be versioned.
Deleted: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/runtimes.properties
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/runtimes.properties 2012-04-19 09:45:39 UTC (rev 40327)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/runtimes.properties 2012-04-19 09:47:08 UTC (rev 40328)
@@ -1 +0,0 @@
-jboss-as-7.1.0.Final=${jboss-as-7-1}
\ No newline at end of file
13 years, 11 months
JBoss Tools SVN: r40327 - trunk/runtime/tests.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-04-19 05:45:39 -0400 (Thu, 19 Apr 2012)
New Revision: 40327
Removed:
trunk/runtime/tests/org.jboss.tools.runtime.as.detector.ui.bot.test/
Log:
Deleted empty plugin folder that will not be used.
13 years, 11 months
JBoss Tools SVN: r40326 - in trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test: META-INF and 17 other directories.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-04-19 05:36:22 -0400 (Thu, 19 Apr 2012)
New Revision: 40326
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/.classpath
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/.project
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/META-INF/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/META-INF/MANIFEST.MF
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/build.properties
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_detection_AllTestsSuite.launch
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/pom.xml
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/runtimes.properties
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/Activator.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/AllTestsSuite.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/RuntimeProperties.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Server.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/jboss71/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/jboss71/DetectJBoss71.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/jboss71/OperateJBoss71.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/ServerMatcher.java
Log:
Initial commit
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/.classpath
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/.classpath (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/.classpath 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/.project
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/.project (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/.project 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.runtime.as.ui.bot.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/META-INF/MANIFEST.MF 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Runtime Test
+Bundle-SymbolicName: org.jboss.tools.runtime.as.ui.bot.test;singleton:=true
+Bundle-Version: 1.3.0.qualifier
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor:
+ JBoss by Red Hat
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.apache.log4j;bundle-version="1.2.13",
+ org.junit4;bundle-version="4.8.1",
+ org.jboss.tools.ui.bot.ext;bundle-version="1.0.0",
+ org.hamcrest;bundle-version="1.1.0",
+ org.jboss.tools.runtime.core,
+ org.jboss.tools.runtime.ui;bundle-version="1.3.0"
+
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/build.properties
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/build.properties (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/build.properties 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,6 @@
+source.. = src/,\
+ resources/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/
\ No newline at end of file
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_detection_AllTestsSuite.launch
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_detection_AllTestsSuite.launch (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_detection_AllTestsSuite.launch 2012-04-19 09:36:22 UTC (rev 40326)
@@ -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/AllTestsSuite.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.AllTestsSuite"/>
+<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/launchers/prepare_workspace/pom.xml
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/pom.xml (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/pom.xml 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,21 @@
+<?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">
+
+ <groupId>org.jboss.tools.runtime.as.ui.bot.test</groupId>
+ <artifactId>prepare.workspace</artifactId>
+ <version>0.0.0-SNAPSHOT</version>
+ <modelVersion>4.0.0</modelVersion>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>../../resources/template</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>runtimes.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ <outputDirectory>../../resources</outputDirectory>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/runtimes.properties
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/runtimes.properties (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/runtimes.properties 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1 @@
+jboss-as-7.1.0.Final=${jboss-as-7-1}
\ No newline at end of file
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/Activator.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/Activator.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/Activator.java 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,50 @@
+package org.jboss.tools.runtime.as.ui.bot.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.runtime.as.ui.bot.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/AllTestsSuite.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/AllTestsSuite.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/AllTestsSuite.java 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,16 @@
+package org.jboss.tools.runtime.as.ui.bot.test;
+
+import org.jboss.tools.runtime.as.ui.bot.test.jboss71.DetectJBoss71;
+import org.jboss.tools.runtime.as.ui.bot.test.jboss71.OperateJBoss71;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+(a)RunWith(RequirementAwareSuite.class)
+(a)Suite.SuiteClasses({
+ DetectJBoss71.class,
+ OperateJBoss71.class
+})
+public class AllTestsSuite {
+
+}
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/RuntimeProperties.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/RuntimeProperties.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/RuntimeProperties.java 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,54 @@
+package org.jboss.tools.runtime.as.ui.bot.test;
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+
+/**
+ * Reads the configured runtimes from the property file.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class RuntimeProperties {
+
+ private static final RuntimeProperties INSTANCE = new RuntimeProperties();
+
+ private static Properties properties;
+
+ private RuntimeProperties() {
+ // singleton
+ }
+
+ public static RuntimeProperties getInstance() {
+ return INSTANCE;
+ }
+
+ public String getRuntimePath(String runtimeId){
+ if (properties == null){
+ loadProperties();
+ }
+
+ String path = properties.getProperty(runtimeId);
+
+ if (path == null){
+ throw new IllegalArgumentException("No runtime path found for runtime id " + runtimeId);
+ }
+
+ return path;
+ }
+
+ private void loadProperties() {
+ try {
+ properties = new Properties();
+ properties.load(new FileReader(SWTUtilExt.getResourceFile(Activator.PLUGIN_ID, "/runtimes.properties")));
+ } catch (FileNotFoundException e) {
+ throw new RuntimeException(e);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,44 @@
+package org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences;
+
+import java.util.Set;
+
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
+import org.jboss.tools.runtime.core.model.RuntimePath;
+import org.jboss.tools.runtime.ui.RuntimeUIActivator;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.Preference;
+import org.jboss.tools.ui.bot.ext.gen.IPreference;
+
+public class RuntimeDetectionPreferencesDialog {
+
+ public void open(){
+ IPreference preference = Preference.create("JBoss Tools", "JBoss Tools Runtime Detection");
+ SWTBotFactory.getOpen().preferenceOpen(preference);
+ }
+
+ public SearchingForRuntimesDialog addPath(final String path){
+ UIThreadRunnable.syncExec(new VoidResult() {
+
+ @Override
+ public void run() {
+ Set<RuntimePath> runtimePaths = RuntimeUIActivator.getDefault().getRuntimePaths();
+ runtimePaths.add(new RuntimePath(path));
+ RuntimeUIActivator.getDefault().saveRuntimePaths();
+ }
+ });
+
+ SWTBotFactory.getBot().button("OK").click();
+ open();
+ return new SearchingForRuntimesDialog();
+ }
+
+ public void ok(){
+ SWTBotFactory.getBot().button("OK").click();
+ }
+
+ public SearchingForRuntimesDialog search(){
+ SWTBotFactory.getBot().button("Search...").click();
+ return new SearchingForRuntimesDialog();
+ }
+}
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,30 @@
+package org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+
+public class SearchingForRuntimesDialog {
+
+ public List<Server> getServers(){
+ List<Server> servers = new ArrayList<Server>();
+ SWTBotTree tree = SWTBotFactory.getBot().tree();
+
+ for (int i = 0; i < tree.rowCount(); i++){
+ Server server = new Server();
+ server.setName(tree.cell(i, 0));
+ server.setVersion(tree.cell(i, 1));
+ server.setType(tree.cell(i, 2));
+ server.setLocation(tree.cell(i, 3));
+ servers.add(server);
+ }
+ return servers;
+ }
+
+ public void ok(){
+ SWTBotFactory.getBot().button("OK").click();
+ }
+}
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Server.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Server.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Server.java 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,94 @@
+package org.jboss.tools.runtime.as.ui.bot.test.entity;
+
+public class Server {
+
+ String name;
+
+ String version;
+
+ String type;
+
+ String location;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result
+ + ((location == null) ? 0 : location.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ result = prime * result + ((version == null) ? 0 : version.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Server other = (Server) obj;
+ if (location == null) {
+ if (other.location != null)
+ return false;
+ } else if (!location.equals(other.location))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (type == null) {
+ if (other.type != null)
+ return false;
+ } else if (!type.equals(other.type))
+ return false;
+ if (version == null) {
+ if (other.version != null)
+ return false;
+ } else if (!version.equals(other.version))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "Server [name=" + name + ", version=" + version + ", type="
+ + type + ", location=" + location + "]";
+ }
+}
\ No newline at end of file
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/jboss71/DetectJBoss71.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/jboss71/DetectJBoss71.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/jboss71/DetectJBoss71.java 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,48 @@
+package org.jboss.tools.runtime.as.ui.bot.test.jboss71;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+
+import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
+import org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences.RuntimeDetectionPreferencesDialog;
+import org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences.SearchingForRuntimesDialog;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+import org.jboss.tools.runtime.as.ui.bot.test.matcher.ServerMatcher;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.junit.After;
+import org.junit.Test;
+
+public class DetectJBoss71 extends SWTTestExt {
+
+ public static final String JBOSS_7_1 = "jboss-as-7.1.0.Final";
+
+ private RuntimeDetectionPreferencesDialog preferences;
+
+ private SearchingForRuntimesDialog searchingForRuntimesDialog;
+
+ @Test
+ public void detectJBoss71(){
+ preferences = new RuntimeDetectionPreferencesDialog();
+ preferences.open();
+ preferences.addPath(RuntimeProperties.getInstance().getRuntimePath(JBOSS_7_1));
+ searchingForRuntimesDialog = preferences.search();
+
+ assertThat(searchingForRuntimesDialog.getServers().size(), is(1));
+ assertThat(searchingForRuntimesDialog.getServers().get(0), new ServerMatcher(getExpectedServer()));
+ }
+
+ private Server getExpectedServer() {
+ Server expectedServer = new Server();
+ expectedServer.setName(JBOSS_7_1);
+ expectedServer.setVersion("7.1");
+ expectedServer.setType("AS");
+ expectedServer.setLocation(RuntimeProperties.getInstance().getRuntimePath(JBOSS_7_1));
+ return expectedServer;
+ }
+
+ @After
+ public void closePreferences(){
+ searchingForRuntimesDialog.ok();
+ preferences.ok();
+ }
+}
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/jboss71/OperateJBoss71.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/jboss71/OperateJBoss71.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/jboss71/OperateJBoss71.java 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,54 @@
+package org.jboss.tools.runtime.as.ui.bot.test.jboss71;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.not;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.matcher.console.ConsoleOutputMatcher;
+import org.jboss.tools.ui.bot.ext.view.ServersView;
+import org.junit.Test;
+
+public class OperateJBoss71 extends SWTTestExt {
+
+ private ServersView serversView = new ServersView();
+
+ @Test
+ public void startJBoss71(){
+ serversView.startServer(DetectJBoss71.JBOSS_7_1);
+
+ assertNoException();
+ assertServerState("Started");
+ }
+
+ @Test
+ public void restartJBoss71(){
+ serversView.restartServer(DetectJBoss71.JBOSS_7_1);
+
+ assertNoException();
+ assertServerState("Started");
+ }
+
+ @Test
+ public void stopJBoss71(){
+ serversView.stopServer(DetectJBoss71.JBOSS_7_1);
+
+ assertNoException();
+ assertServerState("Stopped");
+ }
+
+ @Test
+ public void deleteJBoss71(){
+ serversView.deleteServer(DetectJBoss71.JBOSS_7_1);
+
+ assertFalse(serversView.serverExists(DetectJBoss71.JBOSS_7_1));
+ }
+
+ private void assertNoException() {
+ assertThat("Exception:", not(new ConsoleOutputMatcher()));
+ }
+
+ private void assertServerState(String state) {
+ assertThat(serversView.getServerStatus(DetectJBoss71.JBOSS_7_1), is(state));
+ }
+}
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/ServerMatcher.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/ServerMatcher.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/ServerMatcher.java 2012-04-19 09:36:22 UTC (rev 40326)
@@ -0,0 +1,24 @@
+package org.jboss.tools.runtime.as.ui.bot.test.matcher;
+
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeMatcher;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+
+public class ServerMatcher extends TypeSafeMatcher<Server>{
+
+ private Server expected;
+
+ public ServerMatcher(Server expected) {
+ this.expected = expected;
+ }
+
+ @Override
+ public boolean matchesSafely(Server item) {
+ return expected.equals(item);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendValue(expected);
+ }
+}
13 years, 11 months
JBoss Tools SVN: r40325 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-04-19 05:11:57 -0400 (Thu, 19 Apr 2012)
New Revision: 40325
Modified:
trunk/build/parent/pom.xml
Log:
JBIDE-10537 : Re-enable Jacoco (0.5.7)
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2012-04-19 09:02:39 UTC (rev 40324)
+++ trunk/build/parent/pom.xml 2012-04-19 09:11:57 UTC (rev 40325)
@@ -176,7 +176,8 @@
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
<!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->
- <argLine>${memoryOptions1} ${memoryOptions2} ${systemProperties} -Dusage_reporting_enabled=false</argLine>
+ <!-- tycho.testArgLine repeated to keep jacoco configuration for jacoco-maven-plugin -->
+ <argLine>${tycho.testArgLine} ${memoryOptions1} ${memoryOptions2} ${systemProperties} -Dusage_reporting_enabled=false</argLine>
<!-- https://docs.sonatype.org/display/TYCHO/How+to+run+SWTBot+tests+with+Tycho -->
<!-- set useUIThread=true for regular ui tests -->
<!-- set useUIThread=false for swtbot tests (?) -->
@@ -248,31 +249,28 @@
<encoding>ISO-8859-1</encoding>
</configuration>
</plugin>
- <!-- Plugin disabled because of conflicts with Emma: JBIDE-10537
- TODO re-enable as soon as we have Jacoco "continous" reports, and we get rid of Emma
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>0.5.6.201201232323</version>
+ <version>0.5.7.201204190339</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
- <!- Where to put jacoco coverage report, basically in the tests/target folder
- for each component ->
+ <!-- Where to put jacoco coverage report, basically in the tests/target folder
+ for each component -->
<destFile>../target/jacoco.exec</destFile>
<includes>
<include>${coverage.filter}</include>
</includes>
- <!- Merge reports from all executions ->
+ <!-- Merge reports from all executions -->
<append>true</append>
</configuration>
</execution>
</executions>
</plugin>
- -->
</plugins>
<pluginManagement>
13 years, 11 months
JBoss Tools SVN: r40324 - trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-04-19 05:02:39 -0400 (Thu, 19 Apr 2012)
New Revision: 40324
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
Log:
Fixes for JBoss AS 7.0
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-04-19 08:04:48 UTC (rev 40323)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-04-19 09:02:39 UTC (rev 40324)
@@ -12,7 +12,7 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
- <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-5.1.0.GA</jbosstools.test.jboss-as.home>
+ <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-as-web-7.0.2.Final</jbosstools.test.jboss-as.home>
<systemProperties>-Dswtbot.test.skip=false -Dtest.configurations.dir=resources/properties/ -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home} -Dorg.eclipse.swt.browser.XULRunnerPath=${project.build.outputDirectory}/../work/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.2.16b/xulrunner</systemProperties>
<test.suite.class>org.jboss.tools.jsf.ui.bot.test.JSFAllBotTests</test.suite.class>
</properties>
13 years, 11 months
JBoss Tools SVN: r40323 - trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-04-19 04:04:48 -0400 (Thu, 19 Apr 2012)
New Revision: 40323
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
Log:
Remove debug option.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-04-19 07:54:49 UTC (rev 40322)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-04-19 08:04:48 UTC (rev 40323)
@@ -12,8 +12,8 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
- <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-as-web-7.0.2.Final</jbosstools.test.jboss-as.home>
- <systemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -Dswtbot.test.skip=false -Dtest.configurations.dir=resources/properties/ -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home} -Dorg.eclipse.swt.browser.XULRunnerPath=${project.build.outputDirectory}/../work/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.2.16b/xulrunner</systemProperties>
+ <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-5.1.0.GA</jbosstools.test.jboss-as.home>
+ <systemProperties>-Dswtbot.test.skip=false -Dtest.configurations.dir=resources/properties/ -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home} -Dorg.eclipse.swt.browser.XULRunnerPath=${project.build.outputDirectory}/../work/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.2.16b/xulrunner</systemProperties>
<test.suite.class>org.jboss.tools.jsf.ui.bot.test.JSFAllBotTests</test.suite.class>
</properties>
<build>
13 years, 11 months
JBoss Tools SVN: r40322 - in trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test: resources/properties and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-04-19 03:54:49 -0400 (Thu, 19 Apr 2012)
New Revision: 40322
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/requirements.properties
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/swtbot.properties
Log:
Run SWT Bot tests with JBoss AS 7.0
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-04-19 07:43:08 UTC (rev 40321)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-04-19 07:54:49 UTC (rev 40322)
@@ -1,60 +1,66 @@
<?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.jsf</groupId>
- <artifactId>tests</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools.jsf.tests</groupId>
- <artifactId>org.jboss.tools.jsf.ui.bot.test</artifactId>
-
- <packaging>eclipse-test-plugin</packaging>
- <properties>
- <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-5.1.0.GA</jbosstools.test.jboss-as.home>
- <systemProperties>-Dswtbot.test.skip=false -Dtest.configurations.dir=resources/properties/ -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home} -Dorg.eclipse.swt.browser.XULRunnerPath=${project.build.outputDirectory}/../work/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.2.16b/xulrunner</systemProperties>
- <test.suite.class>org.jboss.tools.jsf.ui.bot.test.JSFAllBotTests</test.suite.class>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <configuration>
- <testSuite>org.jboss.tools.jsf.ui.bot.test</testSuite>
- <testClass>${test.suite.class}</testClass>
- <useUIThread>false</useUIThread>
- <skip>${swtbot.test.skip}</skip>
- <product>org.eclipse.platform.ide</product>
- <dependencies combine.children="append">
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.jboss.tools.vpe.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.jboss.tools.jsf.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.jst.enterprise_ui.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.jst.web_core.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- </dependencies>
- </configuration>
- </plugin>
- </plugins>
- </build>
+<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.jsf</groupId>
+ <artifactId>tests</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.jsf.tests</groupId>
+ <artifactId>org.jboss.tools.jsf.ui.bot.test</artifactId>
+
+ <packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-as-web-7.0.2.Final</jbosstools.test.jboss-as.home>
+ <systemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -Dswtbot.test.skip=false -Dtest.configurations.dir=resources/properties/ -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home} -Dorg.eclipse.swt.browser.XULRunnerPath=${project.build.outputDirectory}/../work/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.2.16b/xulrunner</systemProperties>
+ <test.suite.class>org.jboss.tools.jsf.ui.bot.test.JSFAllBotTests</test.suite.class>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <testSuite>org.jboss.tools.jsf.ui.bot.test</testSuite>
+ <testClass>${test.suite.class}</testClass>
+ <useUIThread>false</useUIThread>
+ <skip>${swtbot.test.skip}</skip>
+ <product>org.eclipse.platform.ide</product>
+ <dependencies combine.children="append">
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.vpe.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.jsf.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.enterprise_ui.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.web_core.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.wst.web_ui.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/requirements.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/requirements.properties 2012-04-19 07:43:08 UTC (rev 40321)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/requirements.properties 2012-04-19 07:54:49 UTC (rev 40322)
@@ -1 +1 @@
-requirements=jbossas-5.1.0.GA
+requirements=jbossas-7.0.2.Final
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/swtbot.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/swtbot.properties 2012-04-19 07:43:08 UTC (rev 40321)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/swtbot.properties 2012-04-19 07:54:49 UTC (rev 40322)
@@ -5,7 +5,7 @@
# JAVA=1.6,${JAVA_HOME}
#EAP|JBOSS_AS|EPP|SOA,<server version>,<jre version to run with>|default,<server home>
# note : when server is type of SOA, version is version of SOA (not the bundled EAP)
-SERVER=EAP,5.x,default,${jbosstools.test.jboss-as.home}
+SERVER=AS,7.0,default,${jbosstools.test.jboss-as.home}
#<seam version>,<seam runtime home>
#SEAM=2.2,/opt/jbdevstudio4.1.1.GA/jboss-eap/seam
#<esb versoin>,<esb runtime home>
13 years, 11 months