From mboxrd@z Thu Jan 1 00:00:00 1970 From: ldimaggi@sourceware.org Date: 5 Feb 2007 17:30:51 -0000 Subject: [Cluster-devel] conga/luci/test CGA_0200_Create_cluster.py con ... Message-ID: <20070205173051.6319.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: ldimaggi at sourceware.org 2007-02-05 17:30:50 Modified files: luci/test : CGA_0200_Create_cluster.py congaDemoTests.py conga_Helpers.py conga_suite.py tests_README.txt Log message: Changes to sync up with GUI changes. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/CGA_0200_Create_cluster.py.diff?cvsroot=cluster&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/congaDemoTests.py.diff?cvsroot=cluster&r1=1.8&r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_Helpers.py.diff?cvsroot=cluster&r1=1.10&r2=1.11 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_suite.py.diff?cvsroot=cluster&r1=1.7&r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/tests_README.txt.diff?cvsroot=cluster&r1=1.1&r2=1.2 --- conga/luci/test/CGA_0200_Create_cluster.py 2006/12/14 20:01:40 1.2 +++ conga/luci/test/CGA_0200_Create_cluster.py 2007/02/05 17:30:49 1.3 @@ -67,9 +67,9 @@ # sel.type("__SYSTEM1:Passwd", "password") # sel.click("//input[@value='Add Another Row']") systemCounter = 0 - for systemName in CONGA_CLUSTER_SYSTEMS.keys(): + for systemName in CONGA_SMALL_CLUSTER_SYSTEMS.keys(): sel.type("__SYSTEM" + str(systemCounter) + ":Addr", systemName) - sel.type("__SYSTEM" + str(systemCounter) + ":Passwd", CONGA_CLUSTER_SYSTEMS[systemName]) + sel.type("__SYSTEM" + str(systemCounter) + ":Passwd", CONGA_SMALL_CLUSTER_SYSTEMS[systemName]) systemCounter = systemCounter + 1 if (systemCounter > 2): sel.click("//input[@value='Add Another Row']") @@ -102,7 +102,7 @@ self.assertTrue (sel.is_text_present('Removed cluster "testCluster" successfully')) # Delete the storage systems created when the cluster was created - for systemName in CONGA_CLUSTER_SYSTEMS: + for systemName in CONGA_SMALL_CLUSTER_SYSTEMS: deleteStorageSystem(sel, systemName) # Validation - verify that the success message was displayed for each storage system self.assertEqual("Do you really want to remove the following managed systems:\nStorage Systems:\n-" + systemName, sel.get_confirmation()) --- conga/luci/test/congaDemoTests.py 2006/12/14 20:01:40 1.8 +++ conga/luci/test/congaDemoTests.py 2007/02/05 17:30:49 1.9 @@ -122,13 +122,13 @@ # sel.type("__SYSTEM1:Passwd", "password") # sel.click("//input[@value='Add Another Row']") systemCounter = 0 - for systemName in CONGA_CLUSTER_SYSTEMS.keys(): + for systemName in CONGA_SMALL_CLUSTER_SYSTEMS.keys(): sel.type("__SYSTEM" + str(systemCounter) + ":Addr", systemName) - sel.type("__SYSTEM" + str(systemCounter) + ":Passwd", CONGA_CLUSTER_SYSTEMS[systemName]) + sel.type("__SYSTEM" + str(systemCounter) + ":Passwd", CONGA_SMALL_CLUSTER_SYSTEMS[systemName]) systemCounter = systemCounter + 1 if (systemCounter > 2): - sel.click("//input[@value='Add Another Row']") - sel.click("document.adminform.rhn_dl[1]") + sel.click("//input[@value='Add another entry']") + #sel.click("document.adminform.rhn_dl[1]") sel.click("Submit") sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY) @@ -157,8 +157,8 @@ self.assertTrue (sel.is_text_present('Removed cluster "testCluster" successfully')) # Delete the storage systems created when the cluster was created - for systemName in CONGA_CLUSTER_SYSTEMS: - deleteStorageSystem(sel, systemName) + for systemName in CONGA_SMALL_CLUSTER_SYSTEMS: + deleteStorageSystem(sel, systemName, self.logger) # Validation - verify that the success message was displayed for each storage system self.assertEqual("Do you really want to remove the following managed systems:\nStorage Systems:\n-" + systemName, sel.get_confirmation()) sel.wait_for_page_to_load(PAGE_DISPLAY_DELAY) --- conga/luci/test/conga_Helpers.py 2006/12/14 20:01:40 1.10 +++ conga/luci/test/conga_Helpers.py 2007/02/05 17:30:49 1.11 @@ -45,20 +45,23 @@ # 20061130 - Node tng3-1 isn't booting, node tng3-4 is having some problems too -CONGA_STORAGE_SYSTEMS = {'tng3-1.lab.msp.redhat.com':'password', -# 'tng3-2.lab.msp.redhat.com':'password', +CONGA_STORAGE_SYSTEMS = { 'tng3-1.lab.msp.redhat.com':'password', + 'tng3-2.lab.msp.redhat.com':'password', 'tng3-3.lab.msp.redhat.com':'password', -# 'tng3-4.lab.msp.redhat.com':'password', + 'tng3-4.lab.msp.redhat.com':'password', 'tng3-5.lab.msp.redhat.com':'password'} -#CONGA_CLUSTER_SYSTEMS = {'tng3-1.lab.msp.redhat.com':'password', -# 'tng3-2.lab.msp.redhat.com':'password', -# 'tng3-3.lab.msp.redhat.com':'password', -# 'tng3-4.lab.msp.redhat.com':'password'} - -CONGA_CLUSTER_SYSTEMS = {'tng3-1.lab.msp.redhat.com':'password', +CONGA_SMALL_CLUSTER_SYSTEMS = { 'tng3-1.lab.msp.redhat.com':'password', + 'tng3-2.lab.msp.redhat.com':'password', + 'tng3-3.lab.msp.redhat.com':'password', 'tng3-4.lab.msp.redhat.com':'password' } +CONGA_LARGE_CLUSTER_SYSTEMS = {'tng3-1.lab.msp.redhat.com':'password', + 'tng3-2.lab.msp.redhat.com':'password', + 'tng3-3.lab.msp.redhat.com':'password', + 'tng3-4.lab.msp.redhat.com':'password', + 'tng3-5.lab.msp.redhat.com':'password'} + CONGA_USERS = {'user1':'user1_password', 'user2':'user2_password', 'user3':'user3_password', @@ -71,14 +74,14 @@ 'user10':'user10_password'} CONGA_USERS_SYSTEMS = {'user1':'tng3-1.lab.msp.redhat.com', -# 'user2':'tng3-2.lab.msp.redhat.com', + 'user2':'tng3-2.lab.msp.redhat.com', 'user3':'tng3-3.lab.msp.redhat.com', -# 'user4':'tng3-4.lab.msp.redhat.com', + 'user4':'tng3-4.lab.msp.redhat.com', 'user5':'tng3-5.lab.msp.redhat.com', 'user6':'tng3-1.lab.msp.redhat.com', -# 'user7':'tng3-2.lab.msp.redhat.com', + 'user7':'tng3-2.lab.msp.redhat.com', 'user8':'tng3-3.lab.msp.redhat.com', -# 'user9':'tng3-4.lab.msp.redhat.com', + 'user9':'tng3-4.lab.msp.redhat.com', 'user10':'tng3-5.lab.msp.redhat.com'} # Data used to verify the on-line help contents. The Dictionary contains @@ -93,9 +96,9 @@ HELP_DICTIONARY = {'Conga User Manual':77, 'Introduction':200, 'Conga Architecture':225, - 'Homebase Tab':4225, - 'Cluster Tab':10121, - 'Storage Tab':20452 } + 'Homebase Tab':4257, + 'Cluster Tab':12280, + 'Storage Tab':23833 } def createStorageSystem(sel, systemName, systemPassword, theLogger): """Common code to create storage systems""" --- conga/luci/test/conga_suite.py 2006/12/14 20:01:40 1.7 +++ conga/luci/test/conga_suite.py 2007/02/05 17:30:49 1.8 @@ -67,15 +67,15 @@ # Assemble the suite suite = unittest.TestSuite() -suite.addTest(congaDemoSuite) +#suite.addTest(congaDemoSuite) #suite.addTest(CGA_0160_Add_UserSuite) suite.addTest(CGA_0170_Online_Documentation_Portlet_Suite) #suite.addTest(CGA_0200_Create_cluster_Suite) # Run the test suite -# unittest.TextTestRunner(verbosity=2).run(suite) +unittest.TextTestRunner(verbosity=2).run(suite) -# Write all pyunit-generated messages to a log file -output = open(CONGA_LOG, "w") -unittest.TextTestRunner(output).run(suite) -output.close() +# Or, write all pyunit-generated messages to a log file +#output = open(CONGA_LOG, "w") +#unittest.TextTestRunner(output).run(suite) +#output.close() --- conga/luci/test/tests_README.txt 2006/12/11 21:37:22 1.1 +++ conga/luci/test/tests_README.txt 2007/02/05 17:30:49 1.2 @@ -3,9 +3,10 @@ (Rev 1.0 - 20061211, ldimaggi at redhat.com) -1) Install Selenium Core +1) Install Selenium Core and Selenium RC (Remote Control) a. wget http://release.openqa.org/selenium-core/0.8.1/selenium-core-0.8.1.zip - b. Unzip someplace - I used /opt + b. wget http://release.openqa.org/selenium-remote-control/0.9.0/selenium-remote-control-0.9.0.zip + c. Unzip someplace - I used /opt 2) Make sure Firefox 1.5 or newer is installed - I'm using 1.5.0.8