Author: lzoubek(a)redhat.com
Date: 2010-04-21 04:38:08 -0400 (Wed, 21 Apr 2010)
New Revision: 21572
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SeamBean.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddSeam.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementNotFulfilledException.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/.classpath
trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
Log:
SWTbot extensions : added custom annotation definitions testing purposes, now we can
declaratively define runtime dependencies of SWTBot test classes
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/.classpath
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/.classpath 2010-04-21 07:41:04 UTC (rev
21571)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/.classpath 2010-04-21 08:38:08 UTC (rev
21572)
@@ -3,5 +3,6 @@
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<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>
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2010-04-21 07:41:04
UTC (rev 21571)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2010-04-21 08:38:08
UTC (rev 21572)
@@ -12,7 +12,6 @@
org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.hamcrest;bundle-version="1.1.0",
- org.junit4;bundle-version="4.5.0",
org.apache.log4j;bundle-version="1.2.13",
org.eclipse.datatools.connectivity;bundle-version="1.1.2",
org.eclipse.datatools.connectivity.db.generic;bundle-version="1.0.1",
@@ -20,11 +19,13 @@
org.eclipse.ui.ide;bundle-version="3.5.1",
org.jboss.tools.common.model,
org.jboss.tools.common.model.ui;bundle-version="3.1.0",
- org.eclipse.ui.forms;bundle-version="3.4.1"
+ org.eclipse.ui.forms;bundle-version="3.4.1",
+ org.junit4;bundle-version="4.5.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Eclipse-RegisterBuddy: org.apache.log4j
Export-Package: org.jboss.tools.ui.bot.ext,
+ org.jboss.tools.ui.bot.ext.config,
org.jboss.tools.ui.bot.ext.entity,
org.jboss.tools.ui.bot.ext.gen,
org.jboss.tools.ui.bot.ext.helper,
@@ -32,3 +33,4 @@
org.jboss.tools.ui.bot.ext.types,
org.jboss.tools.ui.bot.ext.view
Bundle-Vendor: JBoss by Red Hat
+Bundle-ClassPath: .
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,7 @@
+# SWTBotTest properties
+JAVA_HOME_15=/usr/java/jdk-1.5.0_12/jre
+JAVA_HOME_16=/opt/sun-jdk-1.6.0.19/jre
+# EAP|JBOSS_AS,<server version>,<jre version to run with>|default,<server
home>
+SERVER=EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as
+#<seam version>,<seam runtime home>
+SEAM=2.2,/data/jboss/jboss-eap-5.0/seam
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,58 @@
+ package org.jboss.tools.ui.bot.ext;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.junit.runner.Runner;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.Suite;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * JUnit4 requirement aware testsuite runner. If suite class is annotated by @
RunWith({@link RequirementAwareSuite}) class, test classes can have {@link
SWTBotTestRequires} annotations
+ *
+ * @author lzoubek(a)redhat.com
+ */
+public class RequirementAwareSuite extends Suite {
+ private static final Logger log = Logger.getLogger(RequirementAwareSuite.class);
+ private class RequirementAwareRunnerBuilder extends RunnerBuilder {
+ @Override
+ public Runner runnerForClass(Class<?> klass) throws Throwable {
+ if (TestConfigurator.canRunClass(klass)) {
+ log.info("Returning runner for test class "+klass.getCanonicalName());
+ return new BlockJUnit4ClassRunner(klass);
+ }
+ log.info("Skipping test class "+klass.getCanonicalName());
+ return null;
+ }
+
+
+ }
+ private final ArrayList<Runner> runners = new ArrayList<Runner>();
+
+ /**
+ * Only called reflectively. Do not use programmatically.
+ */
+
+ /**
+ * Called reflectively on classes annotated with
+ * <code>(a)RunWith(RequirementAwareSuite.class)</code>
+ *
+ * @param klass
+ * the root class
+ */
+ public RequirementAwareSuite(Class<?> klass)
+ throws Throwable {
+ super(klass, Collections.<Runner> emptyList());
+ runners.add(new Suite(klass, new RequirementAwareRunnerBuilder()));
+
+ }
+ @Override
+ protected List<Runner> getChildren() {
+ return runners;
+ }
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-04-21
07:41:04 UTC (rev 21571)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -432,6 +432,48 @@
wiz.textWithLabel(ServerServer.TEXT_SERVER_NAME).setText(serverName);
open.finish(wiz);
}
+ /**
+ * adds seam runtime
+ * @param name of newly added runtime
+ * @param version seam version
+ * @param seamHome path to seam home directory
+ */
+ public void addSeamRuntime(String name, String version, String seamHome) {
+ SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL);
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ boolean createRuntime = true;
+ // first check if Environment doesn't exist
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0) {
+ int currentRow = 0;
+ while (createRuntime && currentRow < numRows) {
+ if (tbRuntimeEnvironments.cell(currentRow, 1).equalsIgnoreCase(
+ name)) {
+ createRuntime = false;
+ } else {
+ currentRow++;
+ }
+ }
+ }
+ if (createRuntime) {
+ wiz.button("Add").click();
+ bot.shell(IDELabel.Shell.NEW_SEAM_RUNTIME).activate();
+ bot.text(0).setText(seamHome);
+ bot.text(1).setText(name);
+ // find and select version
+ String[] versions = bot.comboBox().items();
+ int myIndex =0;
+ for (int index=0;index<versions.length;index++) {
+ if (version.equals(versions[index])) {
+ myIndex=index;
+ break;
+ }
+ }
+ bot.comboBox().setSelection(myIndex);
+ open.finish(bot.activeShell().bot());
+ open.finish(wiz, IDELabel.Button.OK);
+ }
+ }
/**
* adds jboss server runtime only if it's not specified yet
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2010-04-21
07:41:04 UTC (rev 21571)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -10,15 +10,27 @@
******************************************************************************/
package org.jboss.tools.ui.bot.ext;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
import java.util.Properties;
+import java.util.Vector;
import org.apache.log4j.Logger;
import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.jboss.tools.ui.bot.ext.config.ConfiguredState;
+import org.jboss.tools.ui.bot.ext.config.requirement.AddServer;
+import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
+import org.jboss.tools.ui.bot.ext.config.requirement.StartServer;
+import org.jboss.tools.ui.bot.ext.gen.IView;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.view.ConsoleView;
import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
import org.jboss.tools.ui.bot.ext.view.ServersView;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
/**
* Base class for SWTBot Tests using SWTBotExt
* @author jpeterka
@@ -40,6 +52,11 @@
public static final ProblemsView problems = new ProblemsView();
public static final ConsoleView console = new ConsoleView();
+ // config & state
+ public static final ConfiguredState configuredState = new ConfiguredState();
+ public static final List<RequirementBase> beforeRequirements = new
Vector<RequirementBase>();
+ public static final List<RequirementBase> afterRequirements = new
Vector<RequirementBase>();
+
public static Properties properties;
/**
* Get properties for hibernate tests
@@ -57,4 +74,32 @@
public static int TIME_5S = Timing.time5S();
public static int TIME_10S = Timing.time10S();
public static int TIME_20S = Timing.time20S();
+
+ /**
+ * fullfills given requirements
+ * @param requirements
+ */
+ @BeforeClass
+ public static void beforeTest() throws Exception {
+ // try to close Welcome view
+ open.viewClose(new IView(){
+ public List<String> getGroupPath() {
+ return new Vector<String>();
+ }
+ public String getName() {
+ return IDELabel.View.WELCOME;
+ }});
+ log.info("Fullfilling requirements before test");
+ for (RequirementBase r : beforeRequirements) {
+ r.fullfill();
+ }
+ }
+ @AfterClass
+ public static void afterTest() throws Exception {
+ log.info("Fullfilling requirements before test");
+ for (RequirementBase r : afterRequirements) {
+ r.fullfill();
+ }
+ }
+
}
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java 2010-04-21
07:41:04 UTC (rev 21571)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -36,4 +36,7 @@
public static int time(int milis) {
return (int) Math.round(milis*multiplier);
}
+ public static long time100S() {
+ return (int) Math.round(100*1000*multiplier);
+ }
}
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,92 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+
+public class Annotations {
+ /**
+ * annotation which defines requirement of whole test Class
+ * by default all sub-annotations are optional and are
+ * @author lzoubek
+ *
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.TYPE)
+ public @interface SWTBotTestRequires {
+ /**
+ * optionally require server
+ */
+ Server server() default @Server( required = false );
+ Seam seam() default @Seam( required = false );
+ }
+ /**
+ * Server requirement, by default matches all server types and versions
+ * @author lzoubek
+ *
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ public @interface Server {
+ /**
+ * true if Server is required (default)
+ * @return
+ */
+ boolean required() default true;
+ /**
+ * server type to match (Default ALL)
+ * @return
+ */
+ ServerType type() default ServerType.ALL;
+ /**
+ * version of required server (use * for all versions) default *
+ * @return
+ */
+ String version() default "*";
+ /**
+ * defines operator to match server version, possible values
(=,<,>=<=,>=,!=) default =
+ * @return
+ */
+ String operator() default "=";
+ }
+ /**
+ *
+ * @author lzoubek(a)redhat.com
+ *
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ public @interface Seam {
+ /**
+ * true if Seam is required (default)
+ * @return
+ */
+ boolean required() default true;
+ /**
+ * version of required server (use * for all)
+ * @return
+ */
+ String version() default "*";
+ /**
+ * defines operator on server, possible values (=,<,>=<=,>=,!=) default =
+ * @return
+ */
+ String operator() default "=";
+
+ }
+ public enum ServerType {
+ /**
+ * EAP
+ */
+ EAP,
+ /**
+ * Jboss community version
+ */
+ JbossAS,
+ /**
+ * all server types acceptable
+ */
+ ALL
+ }
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,81 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+import java.util.List;
+import java.util.Vector;
+
+import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
+
+/**
+ * this class represents state of running test suite. Properties of this object should be
changed only by
+ * classed extending {@link RequirementBase} class.
+ * @author lzoubek
+ *
+ */
+public class ConfiguredState {
+ private List<String> jreList = new Vector<String>();
+ private Server server = new Server();
+ private Seam seam = new Seam();
+
+ /**
+ * gets list of installed jre's (without the default one)
+ * @return
+ */
+ public List<String> getJreList() {
+ return jreList;
+ }
+ /**
+ * gets configured seam runtime
+ * @return
+ */
+ public Seam getSeam() {
+ return seam;
+ }
+ /**
+ * gets configured server state
+ * @return
+ */
+ public Server getServer() {
+ return server;
+ }
+ public class Server {
+ /**
+ * is server runtime & server added?
+ */
+ public boolean isConfigured=false;
+ /**
+ * is server running?
+ */
+ public boolean isRunning = false;
+ /**
+ * version of server
+ */
+ public String version=null;
+
+ /**
+ * type (EAP | JbossAS )
+ */
+ public String type=null;
+ /**
+ * name of added server/runtime
+ */
+ public String name = null;
+ /**
+ * version of java configured to server (1.5 or 1.6)
+ */
+ public String withJavaVersion=null;
+ }
+ public class Seam {
+ /**
+ * version of seam runtime
+ */
+ public String version=null;
+ /**
+ * is configured?
+ */
+ public boolean isConfiured=false;
+ /**
+ * name of added runtime
+ */
+ public String name=null;
+ }
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SeamBean.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SeamBean.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SeamBean.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,21 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+
+public class SeamBean {
+
+ public String version;
+ public String seamHome;
+
+ public static SeamBean fromString(String propValue) throws Exception{
+ try {
+ String[] seamParams = propValue.split(",");
+ SeamBean bean = new SeamBean();
+ bean.seamHome=seamParams[1];
+ bean.version=seamParams[0];
+ return bean;
+ }
+ catch (Exception ex) {
+ throw new Exception("Cannot parse SEAM property line",ex);
+ }
+ }
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SeamBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,40 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+/**
+ *
+ * @author lzoubek
+ *
+ */
+public class ServerBean {
+
+ public String version;
+ public String runtimeHome;
+ public String withJavaVersion;
+ public ServerType type;
+
+ public enum ServerType {
+ EAP,
+ JBOSS_AS
+ }
+ /**
+ * creates bean instance from property string
+ * @param propValue property value
+ * @return
+ * @throws Exception
+ */
+ public static ServerBean fromString(String propValue) throws Exception {
+ try {
+ String[] serverParams = propValue.split(",");
+ ServerBean bean = new ServerBean();
+ bean.withJavaVersion = serverParams[2];
+ bean.runtimeHome=serverParams[3];
+ bean.version=serverParams[1];
+ bean.type = Enum.valueOf(ServerType.class, serverParams[0]);
+ return bean;
+ }
+ catch (Exception ex) {
+ throw new Exception("Cannot parse SERVER property line",ex);
+ }
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,183 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.jboss.tools.ui.bot.ext.Activator;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.*;
+import org.jboss.tools.ui.bot.ext.config.requirement.AddSeam;
+import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
+import org.jboss.tools.ui.bot.ext.config.requirement.StartServer;
+
+public class TestConfigurator {
+
+
+ public class Keys {
+ public static final String SERVER = "SERVER";
+ public static final String SEAM = "SEAM";
+ public static final String JAVA_HOME_15 = "JAVA_HOME_15";
+ public static final String JAVA_HOME_16 = "JAVA_HOME_16";
+ }
+
+ public class Values {
+ public static final String SERVER_TYPE_EAP = "EAP";
+ public static final String SERVER_TYPE_JBOSSAS = "JBOSS_AS";
+ public static final String SERVER_WITH_DEFAULT_JAVA = "default";
+ }
+
+ public static final String SWTBOT_TEST_PROPERTIES_FILE =
"swtbot.test.properties.file";
+ private static Properties swtTestProperties = new Properties();
+ public static ServerBean server;
+ public static SeamBean seam;
+ static {
+ try {
+ // try to load from file first
+ String propFile = System.getProperty(SWTBOT_TEST_PROPERTIES_FILE,
+ null);
+ if (propFile != null && new File(propFile).exists()) {
+ try {
+ swtTestProperties.load(new FileInputStream(propFile));
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ } else {
+ try {
+ swtTestProperties.load(new FileInputStream(SWTTestExt.util
+ .getResourceFile(Activator.PLUGIN_ID,
+ "/SWTBotTest-default.properties")));
+ } catch (IOException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+
+ //properties got loaded
+ try {
+ server = ServerBean.fromString(getProperty(Keys.SERVER));
+ seam = SeamBean.fromString(getProperty(Keys.SEAM));
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * returns null when given Server annotation does not match global test configuration
+ * (e.g. Test wants Server type EAP but we are running on JbossAS)
+ * @param s Server annotation
+ * @return StartServer requirement otherwise
+ */
+ private static RequirementBase getServerRequirement(Server s) {
+ if (!s.required()) {
+ return null;
+ }
+ if (!s.type().equals(ServerType.ALL)) {
+ if (s.type().equals(ServerType.EAP) &&
!server.type.equals(ServerBean.ServerType.EAP)) {
+ return null;
+ }
+ if (s.type().equals(ServerType.JbossAS) &&
!server.type.equals(ServerBean.ServerType.JBOSS_AS)) {
+ return null;
+ }
+ }
+
+ if (!matches(server.version, s.operator(), s.version())) {
+ return null;
+ }
+ return new StartServer();
+ }
+ /**
+ * returns null when given Seam annotation does not match global test configuration
+ * (e.g. Test wants Seam version 2.2 but we are running on 1.2)
+ * @param s
+ * @return AddSeam requirement otherwise
+ */
+ private static RequirementBase getSeamRequirement(Seam s) {
+ if (!s.required()) {
+ return null;
+ }
+ if (!matches(seam.version, s.operator(), s.version())) {
+ return null;
+ }
+ return new AddSeam();
+ }
+ /**
+ * returns true, if given class (Test) can run, this is done by exploring class'es
+ * annotations (see {@link SWTBotTestRequires}
+ */
+ public static boolean canRunClass(Class<?> klass) {
+ SWTBotTestRequires requies = klass.getAnnotation(SWTBotTestRequires.class);
+ // all not annotated classes can run
+ if (requies==null) {
+ return true;
+ }
+ if (requies.server().required()) {
+ RequirementBase req = getServerRequirement(requies.server());
+ if (req==null) {
+ return false;
+ }
+ SWTTestExt.beforeRequirements.add(req);
+ }
+ if (requies.seam().required()) {
+ RequirementBase req = getSeamRequirement(requies.seam());
+ if (req==null) {
+ return false;
+ }
+ SWTTestExt.beforeRequirements.add(req);
+ }
+ return true;
+ }
+ /**
+ * implements comparison of 2 params by given operator (in this order)
+ * params are expected version strings (in form X.X or XX)
+ * if param1 or param2 is '*' true is returned
+ * @param param1
+ * @param operator (=,<,>=<=,>=,!=)
+ * @param param2
+ *
+ * @return
+ */
+ public static boolean matches(String param1,String operator,String param2) {
+ if ("*".equals(param1)||"*".equals(param2)) {
+ return true;
+ }
+ if ("=".equals(operator)) {
+ return param1.equals(param2);
+ }
+ if ("!=".equals(operator)) {
+ return !param1.equals(param2);
+ }
+ int ver1 = versionToNumber(param1);
+ int ver2 = versionToNumber(param2);
+ if (">".equals(operator)) {
+ return ver1 > ver2;
+ }
+ if (">=".equals(operator)) {
+ return ver1 >= ver2;
+ }
+ if ("<".equals(operator)) {
+ return ver1 < ver2;
+ }
+ if ("<=".equals(operator)) {
+ return ver1 <= ver2;
+ }
+ return false;
+ }
+ private static int versionToNumber(String version) {
+ return Integer.parseInt(version.replaceAll("\\.", ""));
+ }
+ public static String getProperty(String key) {
+ return swtTestProperties.getProperty(key);
+ //return SWTTestExt.util.getValue(swtTestProperties, key);
+ }
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,48 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import static org.junit.Assert.fail;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+/**
+ * adds JRE among Installed JRE's
+ * @author lzoubek
+ *
+ */
+public class AddJRE extends RequirementBase {
+
+ private final String version;
+ /**
+ * requirement for adding JRE
+ * @param version to add
+ */
+ public AddJRE(String version) {
+ this.version = version;
+ }
+ @Override
+ public boolean checkFullfilled() {
+ return SWTTestExt.configuredState.getJreList().contains(getAddedAsName());
+ }
+
+ @Override
+ public void handle(){
+ SWTTestExt.eclipse.addJavaVM(getAddedAsName(), getJavaHome());
+ SWTTestExt.configuredState.getJreList().add(getAddedAsName());
+ }
+ public String getAddedAsName() {
+ return "JRE-"+version;
+ }
+ private String getJavaHome() {
+ if ("1.5".equals(version)) {
+ return TestConfigurator.getProperty(TestConfigurator.Keys.JAVA_HOME_15);
+ }
+ if ("1.6".equals(version)) {
+ return TestConfigurator.getProperty(TestConfigurator.Keys.JAVA_HOME_16);
+ }
+ failParsing();
+ return null;
+ }
+ private void failParsing() {
+ fail("Unable to add JRE runtime, unsupported verson :"+version);
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddSeam.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddSeam.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddSeam.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,22 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+
+public class AddSeam extends RequirementBase {
+
+ @Override
+ public boolean checkFullfilled() {
+ return SWTTestExt.configuredState.getSeam().isConfiured;
+ }
+
+ @Override
+ public void handle() {
+ String seamName = "Seam-"+TestConfigurator.seam.version;
+ SWTTestExt.eclipse.addSeamRuntime(seamName, TestConfigurator.seam.version,
TestConfigurator.seam.seamHome);
+ SWTTestExt.configuredState.getSeam().isConfiured=true;
+ SWTTestExt.configuredState.getSeam().name=seamName;
+ SWTTestExt.configuredState.getSeam().version=TestConfigurator.seam.version;
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddSeam.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,95 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import static org.junit.Assert.fail;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+import org.jboss.tools.ui.bot.ext.gen.IServer;
+import org.jboss.tools.ui.bot.ext.gen.IServerRuntime;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS42;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS50;
+import
org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43;
+import
org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50;
+import
org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossCommunityJBoss42Runtime;
+import
org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossCommunityJBoss50Runtime;
+import
org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43Runtime;
+import
org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50Runtime;
+/**
+ * adds server (version and type depends on {@link TestConfigurator#server}
+ * @author lzoubek
+ *
+ */
+public class AddServer extends RequirementBase {
+
+ private String javaName=null;
+ public AddServer() {
+ String javaVer = getNeededJavaVersion(TestConfigurator.server.withJavaVersion);
+ if (javaVer!=null) {
+ AddJRE addJava = new AddJRE(javaVer);
+ getDependsOn().add(addJava);
+ javaName=addJava.getAddedAsName();
+ }
+
+ }
+
+ @Override
+ public void handle() {
+ ServerInfo serverInfo =
getRuntime(TestConfigurator.server.type.toString(),TestConfigurator.server.version);
+ String runtimeHome=TestConfigurator.server.runtimeHome;
+ String
runtimeName=TestConfigurator.server.type.toString()+"-"+TestConfigurator.server.version;
+ SWTTestExt.eclipse.addJbossServerRuntime(serverInfo.runtime,
+ runtimeHome, runtimeName, javaName);
+ SWTTestExt.eclipse.addServer(serverInfo.server, runtimeName);
+ SWTTestExt.configuredState.getServer().isConfigured=true;
+ SWTTestExt.configuredState.getServer().name=runtimeName;
+ SWTTestExt.configuredState.getServer().version=TestConfigurator.server.version;
+ SWTTestExt.configuredState.getServer().type=TestConfigurator.server.type.toString();
+ }
+
+
+ class ServerInfo {
+ public ServerInfo(IServerRuntime runtime,IServer server) {
+ this.runtime=runtime;
+ this.server=server;
+ }
+ public IServerRuntime runtime;
+ public IServer server;
+ }
+ private String getNeededJavaVersion(String javaVer) {
+ if (TestConfigurator.Values.SERVER_WITH_DEFAULT_JAVA.equals(javaVer)) {
+ return null;
+ }
+ else {return javaVer;}
+
+ }
+ private ServerInfo getRuntime(String serverType, String version) {
+ if (TestConfigurator.Values.SERVER_TYPE_EAP.equals(serverType)) {
+ if ("4.3".equals(version)) {
+ return new
ServerInfo(JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43Runtime.LABEL,
+ JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43.LABEL
+ );
+ }
+ if ("5.0".equals(version)) {
+ return new
ServerInfo(JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50Runtime.LABEL,
+ JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50.LABEL);
+ }
+ } else if (TestConfigurator.Values.SERVER_TYPE_JBOSSAS.equals(serverType)) {
+ if ("4.2".equals(version)) {
+ return new
ServerInfo(JBossCommunityJBoss42Runtime.LABEL,JBossCommunityJBossAS42.LABEL);
+ }
+ if ("5.0".equals(version)) {
+ return new
ServerInfo(JBossCommunityJBoss50Runtime.LABEL,JBossCommunityJBossAS50.LABEL);
+ }
+ }
+ failParsing();
+ return null;
+ }
+ private void failParsing() {
+ fail("Unable to add server runtime, unparsable or not supported property value:
"+TestConfigurator.getProperty(TestConfigurator.Keys.SERVER));
+ }
+ @Override
+ public boolean checkFullfilled() {
+ return SWTTestExt.configuredState.getServer().isConfigured;
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,60 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import java.util.List;
+import java.util.Vector;
+
+import org.apache.log4j.Logger;
+/**
+ * An abstract class for all requirements
+ * @author lzoubek
+ *
+ */
+public abstract class RequirementBase {
+ protected final Logger log = Logger.getLogger(this.getClass());
+ public RequirementBase() {
+ }
+
+ private List<RequirementBase> dependsOn;
+ /**
+ * gets the list of reqs on which this one depends
+ * @return
+ */
+ public List<RequirementBase> getDependsOn() {
+ if (dependsOn==null) {
+ dependsOn = new Vector<RequirementBase>();
+ }
+ return dependsOn;
+ }
+ /**
+ * fulfills this requirement. First fulfills the dependent ones, then this.
+ * @throws RequirementNotFulfilledException
+ */
+ public void fullfill() throws RequirementNotFulfilledException {
+ log.info("Fulfilling requirement
'"+this.getClass().getName()+"'");
+ try {
+ for (RequirementBase dep : getDependsOn()) {
+ dep.fullfill();
+ }
+ if (!checkFullfilled()) {
+ handle();
+ if (!checkFullfilled()) {
+ throw new Exception("Requirement implementation error, checkFullfilled failed
after calling handle();");
+ }
+ }
+ } catch (Exception ex) {
+ throw new RequirementNotFulfilledException("Unable to fulfill requirement
"+this.getClass().getCanonicalName(),ex);
+ }
+ log.info("Requirement '"+this.getClass().getName()+"'
fulfilled");
+
+ }
+ /**
+ * must return true if the Requirement is already fulfilled
+ * @return
+ */
+ public abstract boolean checkFullfilled();
+ /**
+ * handles (should do everything to fulfill requirement), {@link
RequirementBase#checkFullfilled()}
+ * should return true after calling this method
+ */
+ public abstract void handle();
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementNotFulfilledException.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementNotFulfilledException.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementNotFulfilledException.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,20 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+/**
+ * an excetion thrown when error occurs by fulfilling test requirements
+ * @author lzoubek
+ *
+ */
+public class RequirementNotFulfilledException extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ public RequirementNotFulfilledException(String message, Throwable t) {
+ super(message,t);
+ }
+ public RequirementNotFulfilledException(String message) {
+ super(message);
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementNotFulfilledException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -0,0 +1,27 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+/**
+ * Starts server (as dependent requirement has {@link AddServer}
+ * @author lzoubek
+ *
+ */
+public class StartServer extends RequirementBase {
+
+ public StartServer() {
+ // define dependency
+ getDependsOn().add(new AddServer());
+ }
+
+ @Override
+ public boolean checkFullfilled() {
+ return SWTTestExt.configuredState.getServer().isRunning;
+ }
+
+ @Override
+ public void handle(){
+ SWTTestExt.servers.startServer(SWTTestExt.configuredState.getServer().name);
+ SWTTestExt.configuredState.getServer().isRunning = true;
+
+ }
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-04-21
07:41:04 UTC (rev 21571)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -110,6 +110,7 @@
public static final String WARNING = "Warning";
public static final String DROOLS_RUNTIME = "Drools Runtime";
public static final String NEW_DROOLS_PROJECT = "";
+ public static final String NEW_SEAM_RUNTIME = "New Seam Runtime";
}
public class EntityGroup {
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2010-04-21
07:41:04 UTC (rev 21571)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2010-04-21
08:38:08 UTC (rev 21572)
@@ -81,13 +81,14 @@
* @param serverName
*/
public void startServer(String serverName) {
+ show();
SWTBot bot = open.viewSelect(ServerServers.LABEL).bot();
SWTBotTree tree = bot.tree();
SWTBotTreeItem server = findServerByName(tree,serverName);
if (server!=null) {
ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.START,
false)).click();
- new SWTUtilExt(this).waitForNonIgnoredJobs();
+ new SWTUtilExt(this).waitForNonIgnoredJobs(Timing.time100S());
new SWTUtilExt(this).waitForAll(Timing.time3S());
}