Author: sbunciak
Date: 2012-04-17 10:58:20 -0400 (Tue, 17 Apr 2012)
New Revision: 40246
Modified:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeyManagement.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java
Log:
Added logging
Modified:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java
===================================================================
---
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java 2012-04-17
14:15:11 UTC (rev 40245)
+++
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java 2012-04-17
14:58:20 UTC (rev 40246)
@@ -23,22 +23,32 @@
appNameText.setText(TestProperties
.getProperty("openshift.jbossapp.name"));
+ log.info("OpenShift SWTBot Tests: Application name set.");
+
SWTBotCombo appTypeCombo = bot.comboBoxInGroup("New application");
bot.waitUntil(Conditions.widgetIsEnabled(appNameText));
appTypeCombo.setSelection(OpenShiftUI.AppType.JBOSS);
+ log.info("OpenShift SWTBot Tests: Application type selected.");
+
bot.button(IDELabel.Button.NEXT).click();
bot.waitUntil(Conditions.widgetIsEnabled(bot
.button(IDELabel.Button.FINISH)));
bot.button(IDELabel.Button.FINISH).click();
+ log.info("OpenShift SWTBot Tests: Application creation started.");
+
bot.waitForShell("Information", 500);
bot.text(0).setText(TestProperties.getPassphrase());
bot.button(IDELabel.Button.OK).click();
+ log.info("OpenShift SWTBot Tests: SSH passphrase given.");
+
bot.waitUntil(Conditions.shellCloses(bot.activeShell()), TIME_20S);
+ log.info("OpenShift SWTBot Tests: 'New Application wizard' was
closed.");
+
assertNotNull("OpenShift Server runtime is not in the Servers View!",
servers.findServerByName(servers.show().bot().tree(),
TestProperties.getProperty("openshift.jbossapp.name")));
Modified:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java
===================================================================
---
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java 2012-04-17
14:15:11 UTC (rev 40245)
+++
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java 2012-04-17
14:58:20 UTC (rev 40246)
@@ -29,16 +29,9 @@
domainText.setText(TestProperties.getProperty("openshift.domain"));
bot.button(IDELabel.Button.FINISH).click();
- bot.waitUntil(new NonSystemJobRunsCondition());
-
- bot.waitForShell("New OpenShift Express Application", 100);
+ log.info("OpenShift SWTBot Tests: Domain name set.");
- //@SuppressWarnings("unchecked")
- //Matcher<Widget> matcher = WidgetMatcherFactory.allOf(
- // WidgetMatcherFactory.widgetOfType(Shell.class),
- // WidgetMatcherFactory.withText("New OpenShift Express Application"));
-
- //bot.waitUntilWidgetAppears(Conditions.waitForWidget(matcher));
+ // wait while the domain is being created
bot.waitWhile(new ICondition() {
@Override
public boolean test() {
@@ -57,6 +50,13 @@
}, TIME_20S, TIME_1S);
+ log.info("OpenShift SWTBot Tests: Domain created.");
+ log.info("OpenShift SWTBot Tests: Waiting for 'New Application
wizard'.");
+
+ bot.waitForShell("New OpenShift Express Application", 100);
+
+ log.info("OpenShift SWTBot Tests: 'New Application wizard'
created.");
+
bot.waitUntil(new NonSystemJobRunsCondition());
}
Modified:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeyManagement.java
===================================================================
---
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeyManagement.java 2012-04-17
14:15:11 UTC (rev 40245)
+++
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeyManagement.java 2012-04-17
14:58:20 UTC (rev 40246)
@@ -24,9 +24,13 @@
bot.waitUntilWidgetAppears(Conditions.waitForWidget(matcher));
+ log.info("OpenShift SWTBot Tests: SSH Keys creation.");
+
bot.link(0).click("SSH2 Preferences");
bot.waitForShell(IDELabel.Shell.PREFERENCES);
+ log.info("OpenShift SWTBot Tests: SSH Preferences opened.");
+
//SWTBotText sshDirText = bot.text(1);
//sshDirText.setText(System.getProperty("user.home") + "/.ssh2");
@@ -38,6 +42,8 @@
bot.text(0).setText(TestProperties.getPassphrase());
bot.button(IDELabel.Button.OK).click();
+ log.info("OpenShift SWTBot Tests: SSH Keys created.");
+
bot.waitUntilWidgetAppears(Conditions.waitForWidget(matcher));
}
Modified:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java
===================================================================
---
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java 2012-04-17
14:15:11 UTC (rev 40245)
+++
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java 2012-04-17
14:58:20 UTC (rev 40246)
@@ -63,6 +63,8 @@
storePasswordThenForward();
bot.waitForShell("", 100);
+
+ log.info("OpenShift SWTBot Tests: Credentials validated.");
}
/*
@@ -72,14 +74,7 @@
private void storePasswordThenForward() {
if (bot.waitForShell(IDELabel.Shell.SECURE_STORAGE) != null) {
bot.text(0).setText(TestProperties.getPassphrase());
- if (bot.text(1) != null){
- bot.text(1).setText(TestProperties.getPassphrase());
- bot.button(IDELabel.Button.OK).click();
- bot.waitForShell(IDELabel.Shell.SECURE_STORAGE);
- bot.button(IDELabel.Button.CANCEL).click();
- } else {
- bot.button(IDELabel.Button.OK).click();
- }
+ bot.button(IDELabel.Button.OK).click();
}
}
Show replies by date