From: ldimaggi@sourceware.org <ldimaggi@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/test conga_Helpers.py conga_suite.p ...
Date: 7 Dec 2006 20:56:48 -0000 [thread overview]
Message-ID: <20061207205648.570.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: ldimaggi at sourceware.org 2006-12-07 20:56:48
Modified files:
luci/test : conga_Helpers.py conga_suite.py
Added files:
luci/test : CGA_0170_Online_Documenation_Portlet.py
Log message:
Added first version of test for use case CGA-170 - this is also a good regression test for https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=212991
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/CGA_0170_Online_Documenation_Portlet.py.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_Helpers.py.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_suite.py.diff?cvsroot=cluster&r1=1.3&r2=1.4
/cvs/cluster/conga/luci/test/CGA_0170_Online_Documenation_Portlet.py,v --> standard output
revision 1.1
--- conga/luci/test/CGA_0170_Online_Documenation_Portlet.py
+++ - 2006-12-07 20:56:48.501065000 +0000
@@ -0,0 +1,62 @@
+#! /usr/bin/env python
+
+'''
+Script name: GA_0170_Online_Documentation_Portlet.py
+Creation date: Dec 2006
+Purpose: Prototype automated GUI test for RHEL5 Conga (luci server web app) - automated
+ with Selenium RC (remote control) 0.9.0
+Summary: Test for Conga use case CGA-0170 - verify the online user documentation
+ Regression test for: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=212991
+'''
+
+__author__ = 'Len DiMaggio <ldimaggi@redhat.com>'
+
+from selenium import selenium
+import unittest, time, re
+from conga_Helpers import *
+import time
+
+class GA_0170_Online_Documentation_Portlet (unittest.TestCase):
+
+ def setUp(self):
+ """Establish connection to selenium server, login to luci """
+ self.verificationErrors = []
+ self.selenium = login (CONGA_ADMIN_USERNAME, CONGA_ADMIN_PASSWORD)
+
+ """Test to create and delete storage systems"""
+ sel = self.selenium
+
+ def test_docs(self):
+ """Test to verify on-line Help docs"""
+
+ sel = self.selenium
+
+ # Access the on-line help
+ sel.click("link=help")
+ sel.wait_for_pop_up("Conga Help", "30000")
+ sel.select_window('Conga Help')
+
+ # Grab all the text
+ theText = sel.get_html_source()
+
+ # Validation - check the offsets for the items in the HELP list
+ for theItem in HELP_LIST:
+ print 'Verify offset of help text "' + theItem + '" = ' + str(theText.index(theItem))
+ self.assertEqual (theText.index(theItem), HELP_DICTIONARY[theItem])
+
+ # Select the main window
+ sel.select_window('null')
+
+ def tearDown(self):
+ """Logout and stop Selenium session"""
+ logout(self.selenium)
+ self.assertEqual([], self.verificationErrors)
+
+def suite():
+ suite = unittest.TestSuite()
+ suite.addTest(GA_0170_Online_Documentation_Portlet('test_docs'))
+ return suite
+
+if __name__ == "__main__":
+ #unittest.main()
+ unittest.TextTestRunner( verbosity=2 ).run( suite() )
--- conga/luci/test/conga_Helpers.py 2006/12/05 21:23:51 1.4
+++ conga/luci/test/conga_Helpers.py 2006/12/07 20:56:48 1.5
@@ -80,6 +80,22 @@
'user8':'tng3-3.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
+# strings and offsets of the strings in the help as of 20061207
+HELP_LIST = ['Conga User Manual',
+ 'Introduction',
+ 'Conga Architecture',
+ 'Homebase Tab',
+ 'Cluster Tab',
+ 'Storage Tab']
+
+HELP_DICTIONARY = {'Conga User Manual':77,
+ 'Introduction':200,
+ 'Conga Architecture':225,
+ 'Homebase Tab':4225,
+ 'Cluster Tab':10121,
+ 'Storage Tab':20452 }
def createStorageSystem(sel, systemName, systemPassword):
"""Common code to create storage systems"""
--- conga/luci/test/conga_suite.py 2006/12/06 18:58:09 1.3
+++ conga/luci/test/conga_suite.py 2006/12/07 20:56:48 1.4
@@ -31,6 +31,7 @@
import unittest
import congaDemoTests
import CGA_0160_Add_User
+import GA_0170_Online_Documentation_Portlet
# Tests planned - all not yet complete:
# CGA-0160_Add_User.py
@@ -59,11 +60,13 @@
# Define the suite elements
congaDemoSuite = congaDemoTests.suite()
CGA_0160_Add_UserSuite = CGA_0160_Add_User.suite()
+CGA_0170_Online_Documentation_Portlet_Suite = GA_0170_Online_Documentation_Portlet.suite()
# 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)
# Run the test suite
unittest.TextTestRunner(verbosity=2).run(suite)
next reply other threads:[~2006-12-07 20:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 20:56 ldimaggi [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-12-11 21:37 [Cluster-devel] conga/luci/test conga_Helpers.py conga_suite.p ldimaggi
2006-12-05 21:23 ldimaggi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061207205648.570.qmail@sourceware.org \
--to=ldimaggi@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.