JBoss Tools SVN: r42147 - in trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test: as7 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-06-21 12:57:16 -0400 (Thu, 21 Jun 2012)
New Revision: 42147
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Server.java
Removed:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Test.java
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/AllTestsSuite.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeleteAS7Server.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeployJSPProject.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/HotDeployJSPFile.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/OperateAS7Server.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/UndeployJSPProject.java
Log:
Cleanup
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/AllTestsSuite.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/AllTestsSuite.java 2012-06-21 15:43:13 UTC (rev 42146)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/AllTestsSuite.java 2012-06-21 16:57:16 UTC (rev 42147)
@@ -1,6 +1,6 @@
package org.jboss.ide.eclipse.as.ui.bot.test;
-import org.jboss.ide.eclipse.as.ui.bot.test.as7.CreateAS7Test;
+import org.jboss.ide.eclipse.as.ui.bot.test.as7.CreateAS7Server;
import org.jboss.ide.eclipse.as.ui.bot.test.as7.DeleteAS7Server;
import org.jboss.ide.eclipse.as.ui.bot.test.as7.DeployJSPProject;
import org.jboss.ide.eclipse.as.ui.bot.test.as7.HotDeployJSPFile;
@@ -12,7 +12,7 @@
@RunWith(RequirementAwareSuite.class)
@Suite.SuiteClasses({
- CreateAS7Test.class,
+ CreateAS7Server.class,
OperateAS7Server.class,
DeployJSPProject.class,
HotDeployJSPFile.class,
Copied: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Server.java (from rev 41967, trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Test.java)
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Server.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Server.java 2012-06-21 16:57:16 UTC (rev 42147)
@@ -0,0 +1,41 @@
+package org.jboss.ide.eclipse.as.ui.bot.test.as7;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.hasItem;
+import static org.hamcrest.Matchers.is;
+
+import java.util.List;
+
+import org.jboss.ide.eclipse.as.ui.bot.test.editor.ServerEditor;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.jboss.tools.ui.bot.ext.entity.XMLConfiguration;
+import org.jboss.tools.ui.bot.ext.view.ServersView;
+import org.junit.Test;
+
+/**
+ * Creates server and checks its ports (in both the server view and server editor)
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+@Require(server=(a)Server(type=ServerType.EAP, state=ServerState.Present))
+public class CreateAS7Server extends SWTTestExt {
+
+ @Test
+ public void createServer(){
+ ServerEditor editor = new ServerEditor(configuredState.getServer().name);
+ editor.open();
+
+ assertThat("8080", is(editor.getWebPort()));
+ assertThat("9999", is(editor.getManagementPort()));
+
+ ServersView view = new ServersView();
+ List<XMLConfiguration> configurations = view.getXMLConfiguration(configuredState.getServer().name, "Ports");
+ assertThat(configurations, hasItem(new XMLConfiguration("JBoss Management", "${jboss.management.native.port:9999}")));
+ assertThat(configurations, hasItem(new XMLConfiguration("JBoss Web", "8080")));
+ }
+}
Deleted: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Test.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Test.java 2012-06-21 15:43:13 UTC (rev 42146)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Test.java 2012-06-21 16:57:16 UTC (rev 42147)
@@ -1,41 +0,0 @@
-package org.jboss.ide.eclipse.as.ui.bot.test.as7;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.hasItem;
-import static org.hamcrest.Matchers.is;
-
-import java.util.List;
-
-import org.jboss.ide.eclipse.as.ui.bot.test.editor.ServerEditor;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.jboss.tools.ui.bot.ext.entity.XMLConfiguration;
-import org.jboss.tools.ui.bot.ext.view.ServersView;
-import org.junit.Test;
-
-/**
- * Creates server and checks its ports (in both the server view and server editor)
- *
- * @author Lucia Jelinkova
- *
- */
-@Require(server=(a)Server(type=ServerType.EAP, state=ServerState.Present))
-public class CreateAS7Test extends SWTTestExt {
-
- @Test
- public void createServer(){
- ServerEditor editor = new ServerEditor(configuredState.getServer().name);
- editor.open();
-
- assertThat("8080", is(editor.getWebPort()));
- assertThat("9999", is(editor.getManagementPort()));
-
- ServersView view = new ServersView();
- List<XMLConfiguration> configurations = view.getXMLConfiguration(configuredState.getServer().name, "Ports");
- assertThat(configurations, hasItem(new XMLConfiguration("JBoss Management", "${jboss.management.native.port:9999}")));
- assertThat(configurations, hasItem(new XMLConfiguration("JBoss Web", "8080")));
- }
-}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeleteAS7Server.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeleteAS7Server.java 2012-06-21 15:43:13 UTC (rev 42146)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeleteAS7Server.java 2012-06-21 16:57:16 UTC (rev 42147)
@@ -5,7 +5,7 @@
import org.junit.Test;
/**
- * Deletes the server.
+ * Deletes the server and checks that it is not present on the server's view.
*
* @author Lucia Jelinkova
*
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeployJSPProject.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeployJSPProject.java 2012-06-21 15:43:13 UTC (rev 42146)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeployJSPProject.java 2012-06-21 16:57:16 UTC (rev 42147)
@@ -18,6 +18,18 @@
import org.junit.Before;
import org.junit.Test;
+/**
+ * Imports pre-prepared JSP project and adds it into the server. Checks:
+ *
+ * <ul>
+ * <li>the console output</li>
+ * <li>server's label</li>
+ * <li>project is listed under the server</li>
+ * <li>the index.jsp of the project</li>
+ * </ul>
+ * @author Lucia Jelinkova
+ *
+ */
@Require(server=(a)Server(type=ServerType.EAP, state=ServerState.Running))
public class DeployJSPProject extends SWTTestExt {
@@ -33,7 +45,7 @@
}
@Test
- public void deployJSPProject(){
+ public void deployProject(){
ServersView serversView = new ServersView();
serversView.addProjectToServer(PROJECT_NAME, configuredState.getServer().name);
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/HotDeployJSPFile.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/HotDeployJSPFile.java 2012-06-21 15:43:13 UTC (rev 42146)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/HotDeployJSPFile.java 2012-06-21 16:57:16 UTC (rev 42147)
@@ -8,6 +8,14 @@
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.junit.Test;
+/**
+ * Adds a new jsp file into the jsp project and checks it is hot deployed:
+ * <ul>
+ * <li>loads the new page in the web browser </li>
+ * </ul>
+ * @author Lucia Jelinkova
+ *
+ */
public class HotDeployJSPFile extends SWTTestExt {
public static final String JSP_CONTENT =
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/OperateAS7Server.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/OperateAS7Server.java 2012-06-21 15:43:13 UTC (rev 42146)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/OperateAS7Server.java 2012-06-21 16:57:16 UTC (rev 42147)
@@ -1,6 +1,7 @@
package org.jboss.ide.eclipse.as.ui.bot.test.as7;
import static org.hamcrest.MatcherAssert.assertThat;
+
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
@@ -12,6 +13,17 @@
import org.jboss.tools.ui.bot.ext.matcher.console.ConsoleOutputMatcher;
import org.jboss.tools.ui.bot.ext.view.ServersView;
import org.junit.Test;
+
+/**
+ * Starts, restarts and stops the server and checks:
+ * <ul>
+ * <li>the console output</li>
+ * <li>server's label</li>
+ * <li>welcome page is available (if the result state is started)</li>
+ * </ul>
+ * @author Lucia Jelinkova
+ *
+ */
@Require(server=(a)Server(type=ServerType.EAP, state=ServerState.NotRunning))
public class OperateAS7Server extends SWTTestExt {
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/UndeployJSPProject.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/UndeployJSPProject.java 2012-06-21 15:43:13 UTC (rev 42146)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/UndeployJSPProject.java 2012-06-21 16:57:16 UTC (rev 42147)
@@ -13,11 +13,22 @@
import org.jboss.tools.ui.bot.ext.view.ServersView;
import org.junit.Test;
+/**
+ * Removes JSP project from server. Checks:
+ *
+ * <ul>
+ * <li>the console output</li>
+ * <li>server's label</li>
+ * <li>project is not listed under the server</li>
+ * </ul>
+ * @author Lucia Jelinkova
+ *
+ */
@Require(server=(a)Server(type=ServerType.EAP, state=ServerState.Running), clearProjects=false, clearWorkspace=false)
public class UndeployJSPProject extends SWTTestExt {
@Test
- public void deployJSPProject(){
+ public void undeployProject(){
ServersView serversView = new ServersView();
serversView.removeProjectFromServer(DeployJSPProject.PROJECT_NAME, configuredState.getServer().name);