[Jboss-cvs] JBossAS SVN: r55423 - trunk/admin-console/src/webtest/org/jboss/admin/console/webtest

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 8 18:04:07 EDT 2006


Author: chilin
Date: 2006-08-08 18:04:05 -0400 (Tue, 08 Aug 2006)
New Revision: 55423

Modified:
   trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/DestinationQueueTest.java
   trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/DestinationTopicTest.java
   trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/JmsPageTest.java
   trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/LocalTxDataSourcePageTest.java
   trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/NoTxDataSourcePageTest.java
   trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/XATxDataSourcePageTest.java
Log:
Ensure the webtests run in a fixed sequence.

Modified: trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/DestinationQueueTest.java
===================================================================
--- trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/DestinationQueueTest.java	2006-08-08 21:41:59 UTC (rev 55422)
+++ trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/DestinationQueueTest.java	2006-08-08 22:04:05 UTC (rev 55423)
@@ -212,7 +212,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCreateQueueWithBadName() throws Exception {
+	private void createQueueWithBadName() throws Exception {
 		/*
 		 * Build an attributes map with a bad name attribute:
 		 */
@@ -233,7 +233,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCreateQueueWithMissingRequiredData() throws Exception {
+	private void createQueueWithMissingRequiredData() throws Exception {
 		/*
 		 * Create a queue with an empty attribute map and verify the returned
 		 * error message:
@@ -251,7 +251,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCreateQueue() throws Exception {
+	private void createQueue() throws Exception {
 		/*
 		 * Find out the number of existing queues:
 		 */
@@ -300,7 +300,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCreateQueueWithDuplicateName() throws Exception {
+	private void createQueueWithDuplicateName() throws Exception {
 		/*
 		 * Build an attributes map containing duplicate queue name:
 		 */
@@ -320,7 +320,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testViewQueue() throws Exception {
+	private void viewQueue() throws Exception {
 		/*
 		 * Click the "View" button of the test queue and verify the correct page
 		 * was obtained:
@@ -342,7 +342,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testViewDataActions() throws Exception {
+	private void viewDataActions() throws Exception {
 		/*
 		 * Send 3 messages to the test queue:
 		 */
@@ -437,7 +437,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCancelQueueAttributeChanges() throws Exception {
+	private void cancelQueueAttributeChanges() throws Exception {
 		/*
 		 * Get the "View" page of the test queue:
 		 */
@@ -497,7 +497,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testUpdateQueueWithInvalidData() throws Exception {
+	private void updateQueueWithInvalidData() throws Exception {
 		/*
 		 * Get the "View" page of the test queue:
 		 */
@@ -593,7 +593,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testUpdateQueueAttributes() throws Exception {
+	private void updateQueueAttributes() throws Exception {
 		/*
 		 * Get the "View" page of the test queue:
 		 */
@@ -681,7 +681,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testRemoveQueue() throws Exception {
+	private void removeQueue() throws Exception {
 		/*
 		 * Remember the number of existing queues:
 		 */
@@ -713,4 +713,22 @@
 		HtmlForm form = getDestinationEntryFromList(listPage, TEST_QUEUE);
 		assertNull("Test queue should not be avaialable", form);
 	}
+	
+	/**
+	 * Perform a list of tests in sequence.
+	 * 
+	 * @throws Exception
+	 */
+	public void testQueueOperations() throws Exception {
+		createQueueWithBadName();
+		createQueueWithMissingRequiredData();
+		createQueue();
+		createQueueWithDuplicateName();
+		viewQueue();
+		viewDataActions();
+		cancelQueueAttributeChanges();
+		updateQueueWithInvalidData();
+		updateQueueAttributes();
+		removeQueue();
+	}
 }
\ No newline at end of file

Modified: trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/DestinationTopicTest.java
===================================================================
--- trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/DestinationTopicTest.java	2006-08-08 21:41:59 UTC (rev 55422)
+++ trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/DestinationTopicTest.java	2006-08-08 22:04:05 UTC (rev 55423)
@@ -273,7 +273,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCreateTopicWithBadName() throws Exception {
+	private void createTopicWithBadName() throws Exception {
 		/*
 		 * Build an attributes map with a bad name attribute:
 		 */
@@ -294,7 +294,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCreateTopicWithMissingRequiredData() throws Exception {
+	private void createTopicWithMissingRequiredData() throws Exception {
 		/*
 		 * Create a topic with an empty attribute map and verify the returned
 		 * error message:
@@ -312,7 +312,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCreateTopic() throws Exception {
+	private void createTopic() throws Exception {
 		/*
 		 * Find out the number of existing topics:
 		 */
@@ -361,7 +361,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCreateTopicWithDuplicateName() throws Exception {
+	private void createTopicWithDuplicateName() throws Exception {
 		/*
 		 * Build an attributes map containing duplicate topic name:
 		 */
@@ -381,7 +381,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testViewTopic() throws Exception {
+	private void viewTopic() throws Exception {
 		/*
 		 * Click the "View" button of the test topic and verify the correct page
 		 * was obtained:
@@ -403,7 +403,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testViewDataActions() throws Exception {
+	private void viewDataActions() throws Exception {
 		/*
 		 * Click the "View Data" button of the test topic and verify we landed
 		 * at the "Message Statistics" page and there're currently no message
@@ -546,7 +546,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testCancelTopicAttributeChanges() throws Exception {
+	private void cancelTopicAttributeChanges() throws Exception {
 		/*
 		 * Get the "View" page of the test topic:
 		 */
@@ -606,7 +606,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testUpdateTopicWithInvalidData() throws Exception {
+	private void updateTopicWithInvalidData() throws Exception {
 		/*
 		 * Get the "View" page of the test topic:
 		 */
@@ -702,7 +702,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testUpdateTopicAttributes() throws Exception {
+	private void updateTopicAttributes() throws Exception {
 		/*
 		 * Get the "View" page of the test topic:
 		 */
@@ -790,7 +790,7 @@
 	 * 
 	 * @throws Exception
 	 */
-	public void testRemoveTopic() throws Exception {
+	private void removeTopic() throws Exception {
 		/*
 		 * Remember the number of existing topics:
 		 */
@@ -822,4 +822,22 @@
 		HtmlForm form = getDestinationEntryFromList(listPage, TEST_TOPIC);
 		assertNull("Test topic should not be avaialable", form);
 	}
+
+	/**
+	 * Perform a list of tests in sequence.
+	 * 
+	 * @throws Exception
+	 */
+	public void testTopicOperations() throws Exception {
+		createTopicWithBadName();
+		createTopicWithMissingRequiredData();
+		createTopic();
+		createTopicWithDuplicateName();
+		viewTopic();
+		viewDataActions();
+		cancelTopicAttributeChanges();
+		updateTopicWithInvalidData();
+		updateTopicAttributes();
+		removeTopic();
+	}
 }
\ No newline at end of file

Modified: trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/JmsPageTest.java
===================================================================
--- trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/JmsPageTest.java	2006-08-08 21:41:59 UTC (rev 55422)
+++ trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/JmsPageTest.java	2006-08-08 22:04:05 UTC (rev 55423)
@@ -1108,7 +1108,7 @@
          * Sleep for a few seconds then get the jms page again and verify the
          * changes:
          */
-        Thread.sleep(hotDeployWaitTime * 2);
+        Thread.sleep(hotDeployWaitTime * 3);
         jmsPage = (HtmlPage) webClient.getPage(jmsUrl);
         form = jmsPage.getFormByName("jms");
 
@@ -1167,7 +1167,7 @@
         /*
          * Sleep for a few seconds for the changes to take effect:
          */
-        Thread.sleep(hotDeployWaitTime * 2);
+        Thread.sleep(hotDeployWaitTime * 3);
     }
 
     /**

Modified: trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/LocalTxDataSourcePageTest.java
===================================================================
--- trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/LocalTxDataSourcePageTest.java	2006-08-08 21:41:59 UTC (rev 55422)
+++ trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/LocalTxDataSourcePageTest.java	2006-08-08 22:04:05 UTC (rev 55423)
@@ -161,7 +161,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithBadJndiName() throws Exception {
+    private void createDataSourceWithBadJndiName() throws Exception {
         /*
          * Build an attributes map with a bad jndi name:
          */
@@ -186,7 +186,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithMissingRequiredData() throws Exception {
+    private void createDataSourceWithMissingRequiredData() throws Exception {
         /*
          * Build an attributes map without "connectionURL":
          */
@@ -207,7 +207,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithInvalidData() throws Exception {
+    private void createDataSourceWithInvalidData() throws Exception {
         /*
          * Get the Data Source create page:
          */
@@ -324,7 +324,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSource() throws Exception {
+    private void createDataSource() throws Exception {
         /*
          * Find out the number of existing data sources:
          */
@@ -379,7 +379,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithDuplicateName() throws Exception {
+    private void createDataSourceWithDuplicateName() throws Exception {
         /*
          * Build an attributes map containing duplicate jndi name:
          */
@@ -403,7 +403,7 @@
      * 
      * @throws Exception
      */
-    public void testViewDataSource() throws Exception {
+    private void viewDataSource() throws Exception {
         /*
          * Click the "View" button of the test data source and verify the
          * correct page was obtained:
@@ -423,7 +423,7 @@
      * 
      * @throws Exception
      */
-    public void testDataSourceConnection() throws Exception {
+    private void connectToDataSource() throws Exception {
         /*
          * Find the test data source from the data source list page:
          */
@@ -444,7 +444,7 @@
      * 
      * @throws Exception
      */
-    public void testUpdateDataSourceWithInvalidSecurityInfo() throws Exception {
+    private void updateDataSourceWithInvalidSecurityInfo() throws Exception {
         /*
          * Get the "View" page of the test data source:
          */
@@ -508,7 +508,7 @@
      * 
      * @throws Exception
      */
-    public void testCancelDataSourceAttributeChanges() throws Exception {
+    private void cancelDataSourceAttributeChanges() throws Exception {
         /*
          * Get the "View" page of the test data source:
          */
@@ -577,7 +577,7 @@
      * 
      * @throws Exception
      */
-    public void testUpdateDataSourceAttributes() throws Exception {
+    private void updateDataSourceAttributes() throws Exception {
         /*
          * Get the "View" page of the test data source:
          */
@@ -815,7 +815,7 @@
      * 
      * @throws Exception
      */
-    public void testDataSourceConnectionWithBadAttributes() throws Exception {
+    private void connectToDataSourceWithBadAttributes() throws Exception {
         /*
          * The previous test assigned some invalid attributes to the data
          * source, which should cause the connection to fail. Find the test data
@@ -838,7 +838,7 @@
      * 
      * @throws Exception
      */
-    public void testPoolActions() throws Exception {
+    private void performPoolActions() throws Exception {
         /*
          * Get the pool info page and verify all expected pool attributes appear
          * on this page::
@@ -897,7 +897,7 @@
      * 
      * @throws Exception
      */
-    public void testRemoveDataSource() throws Exception {
+    private void removeDataSource() throws Exception {
         /*
          * Remember the number of existing data sources:
          */
@@ -929,4 +929,25 @@
         HtmlForm form = getDataSourceEntryFromList(listPage, TEST_DS);
         assertNull("Test data source should not be avaialable", form);
     }
+    
+    /**
+	 * Perform a list of tests in sequence.
+	 * 
+	 * @throws Exception
+	 */
+	public void testDataSourceOperations() throws Exception {
+		createDataSourceWithBadJndiName();
+		createDataSourceWithMissingRequiredData();
+		createDataSourceWithInvalidData();
+		createDataSource();
+		createDataSourceWithDuplicateName();
+		viewDataSource();
+		connectToDataSource();
+		updateDataSourceWithInvalidSecurityInfo();
+		cancelDataSourceAttributeChanges();
+		updateDataSourceAttributes();
+		connectToDataSourceWithBadAttributes();
+		performPoolActions();
+		removeDataSource();
+	}
 }
\ No newline at end of file

Modified: trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/NoTxDataSourcePageTest.java
===================================================================
--- trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/NoTxDataSourcePageTest.java	2006-08-08 21:41:59 UTC (rev 55422)
+++ trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/NoTxDataSourcePageTest.java	2006-08-08 22:04:05 UTC (rev 55423)
@@ -156,7 +156,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithBadJndiName() throws Exception {
+    private void createDataSourceWithBadJndiName() throws Exception {
         /*
          * Build an attributes map with a bad jndi name:
          */
@@ -180,7 +180,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithMissingRequiredData() throws Exception {
+    private void createDataSourceWithMissingRequiredData() throws Exception {
         /*
          * Build an attributes map without "connectionURL":
          */
@@ -201,7 +201,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithInvalidData() throws Exception {
+    private void createDataSourceWithInvalidData() throws Exception {
         /*
          * Get the Data Source create page:
          */
@@ -318,7 +318,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSource() throws Exception {
+    private void createDataSource() throws Exception {
         /*
          * Find out the number of existing data sources:
          */
@@ -372,7 +372,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithDuplicateName() throws Exception {
+    private void createDataSourceWithDuplicateName() throws Exception {
         /*
          * Build an attributes map containing duplicate jndi name:
          */
@@ -395,7 +395,7 @@
      * 
      * @throws Exception
      */
-    public void testViewDataSource() throws Exception {
+    private void viewDataSource() throws Exception {
         /*
          * Click the "View" button of the test data source and verify the
          * correct page was obtained:
@@ -416,7 +416,7 @@
      * 
      * @throws Exception
      */
-    public void testUploadDriverJarWithBadFile() throws Exception {
+    private void uploadDriverJarWithBadFile() throws Exception {
         String badJar = TestAdminConstants.USER_DIR + FILE_SEP + "src"
                 + FILE_SEP + "etc" + FILE_SEP + "test" + FILE_SEP
                 + "postgresql-8.0-311.jdbc2.xml";
@@ -451,7 +451,7 @@
      * 
      * @throws Exception
      */
-    public void testDataSourceConnectionFailure() throws Exception {
+    private void connectToDataSource() throws Exception {
         /*
          * Find the test data source from the data source list page:
          */
@@ -472,7 +472,7 @@
      * 
      * @throws Exception
      */
-    public void testUpdateDataSourceWithInvalidSecurityInfo() throws Exception {
+    private void updateDataSourceWithInvalidSecurityInfo() throws Exception {
         /*
          * Get the "View" page of the test data source:
          */
@@ -536,7 +536,7 @@
      * 
      * @throws Exception
      */
-    public void testCancelDataSourceAttributeChanges() throws Exception {
+    private void cancelDataSourceAttributeChanges() throws Exception {
         /*
          * Get the "View" page of the test data source:
          */
@@ -605,7 +605,7 @@
      * 
      * @throws Exception
      */
-    public void testUpdateDataSourceAttributes() throws Exception {
+    private void updateDataSourceAttributes() throws Exception {
         /*
          * Remove the postgres jar file from the server's lib directory, if it
          * exists:
@@ -834,7 +834,7 @@
      * 
      * @throws Exception
      */
-    public void testPoolActions() throws Exception {
+    private void performPoolActions() throws Exception {
         /*
          * Get the pool info page and verify all expected pool attributes appear
          * on this page::
@@ -893,7 +893,7 @@
      * 
      * @throws Exception
      */
-    public void testRemoveDataSource() throws Exception {
+    private void removeDataSource() throws Exception {
         /*
          * Remember the number of existing data sources:
          */
@@ -925,4 +925,25 @@
         HtmlForm form = getDataSourceEntryFromList(listPage, TEST_DS);
         assertNull("Test data source should not be avaialable", form);
     }
+    
+    /**
+	 * Perform a list of tests in sequence.
+	 * 
+	 * @throws Exception
+	 */
+	public void testDataSourceOperations() throws Exception {
+		createDataSourceWithBadJndiName();
+		createDataSourceWithMissingRequiredData();
+		createDataSourceWithInvalidData();
+		createDataSource();
+		createDataSourceWithDuplicateName();
+		viewDataSource();
+		uploadDriverJarWithBadFile();
+		connectToDataSource();
+		updateDataSourceWithInvalidSecurityInfo();
+		cancelDataSourceAttributeChanges();
+		updateDataSourceAttributes();
+		performPoolActions();
+		removeDataSource();
+	}
 }
\ No newline at end of file

Modified: trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/XATxDataSourcePageTest.java
===================================================================
--- trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/XATxDataSourcePageTest.java	2006-08-08 21:41:59 UTC (rev 55422)
+++ trunk/admin-console/src/webtest/org/jboss/admin/console/webtest/XATxDataSourcePageTest.java	2006-08-08 22:04:05 UTC (rev 55423)
@@ -167,7 +167,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithBadJndiName() throws Exception {
+    private void createDataSourceWithBadJndiName() throws Exception {
         /*
          * Build an attributes map with a bad jndi name:
          */
@@ -189,7 +189,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithMissingRequiredData() throws Exception {
+    private void createDataSourceWithMissingRequiredData() throws Exception {
         /*
          * Build an attributes map without "dataSourceClassName":
          */
@@ -209,7 +209,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithInvalidData() throws Exception {
+    private void createDataSourceWithInvalidData() throws Exception {
         /*
          * Get the Data Source create page:
          */
@@ -321,7 +321,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSource() throws Exception {
+    private void createDataSource() throws Exception {
         /*
          * Find out the number of existing data sources:
          */
@@ -373,7 +373,7 @@
      * 
      * @throws Exception
      */
-    public void testCreateDataSourceWithDuplicateName() throws Exception {
+    private void createDataSourceWithDuplicateName() throws Exception {
         /*
          * Build an attributes map containing duplicate jndi name:
          */
@@ -394,7 +394,7 @@
      * 
      * @throws Exception
      */
-    public void testViewDataSource() throws Exception {
+    private void viewDataSource() throws Exception {
         /*
          * Click the "View" button of the test data source and verify the
          * correct page was obtained:
@@ -415,7 +415,7 @@
      * 
      * @throws Exception
      */
-    public void testUploadNewDataSourceWithBadFile() throws Exception {
+    private void uploadNewDataSourceWithBadFile() throws Exception {
         String badJar = TestAdminConstants.USER_DIR + FILE_SEP + "src"
                 + FILE_SEP + "etc" + FILE_SEP + "test" + FILE_SEP
                 + "jdbc2_0-stdext.xml";
@@ -450,7 +450,7 @@
      * 
      * @throws Exception
      */
-    public void testUpdateDataSourceWithInvalidSecurityInfo() throws Exception {
+    private void updateDataSourceWithInvalidSecurityInfo() throws Exception {
         /*
          * Get the "View" page of the test data source:
          */
@@ -514,7 +514,7 @@
      * 
      * @throws Exception
      */
-    public void testCancelDataSourceAttributeChanges() throws Exception {
+    private void cancelDataSourceAttributeChanges() throws Exception {
         /*
          * Get the "View" page of the test data source:
          */
@@ -583,7 +583,7 @@
      * 
      * @throws Exception
      */
-    public void testUpdateDataSourceAttributes() throws Exception {
+    private void updateDataSourceAttributes() throws Exception {
         /*
          * Remove the testing jar file from the server's lib directory, if it
          * already exists:
@@ -876,7 +876,7 @@
      * 
      * @throws Exception
      */
-    public void testDataSourceConnectionWithBadAttributes() throws Exception {
+    private void connectToDataSourceWithBadAttributes() throws Exception {
         /*
          * The previous test assigned some invalid attributes to the data
          * source, which should cause the connection to fail. Find the test data
@@ -899,7 +899,7 @@
      * 
      * @throws Exception
      */
-    public void testPoolActions() throws Exception {
+    private void performPoolActions() throws Exception {
         /*
          * Get the pool info page and verify all expected pool attributes appear
          * on this page::
@@ -958,7 +958,7 @@
      * 
      * @throws Exception
      */
-    public void testRemoveDataSource() throws Exception {
+    private void removeDataSource() throws Exception {
         /*
          * Remember the number of existing data sources:
          */
@@ -990,4 +990,25 @@
         HtmlForm form = getDataSourceEntryFromList(listPage, TEST_DS);
         assertNull("Test data source should not be avaialable", form);
     }
+    
+    /**
+	 * Perform a list of tests in sequence.
+	 * 
+	 * @throws Exception
+	 */
+	public void testDataSourceOperations() throws Exception {
+		createDataSourceWithBadJndiName();
+		createDataSourceWithMissingRequiredData();
+		createDataSourceWithInvalidData();
+		createDataSource();
+		createDataSourceWithDuplicateName();
+		viewDataSource();
+		uploadNewDataSourceWithBadFile();
+		updateDataSourceWithInvalidSecurityInfo();
+		cancelDataSourceAttributeChanges();
+		updateDataSourceAttributes();
+		connectToDataSourceWithBadAttributes();
+		performPoolActions();
+		removeDataSource();
+	}
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list