Heikki,
I am in the process of manually merging these changes into the tests
modified to work in the new Test framework. I am confused by your
removal of all the logger calls from TestSharing and TestSubscribe. I
thought we wanted the logger to report discrete actions within the test
but your changes seem to indicate otherwise.
Is there something about these tests that makes logging of these actions
undesirable?
How can I know when it is appropriate for the logger to report discrete
actions within tests?
Dan
-------- Original Message --------
Subject: [commits] (heikki) [10865] Simplify sharing and subscribing
tests.
Date: Wed, 7 Jun 2006 17:42:12 -0700 (PDT)
From: [email protected]
Reply-To: [EMAIL PROTECTED]
To: [email protected]
Revision
10865 <http://viewcvs.osafoundation.org/chandler?view=rev&rev=10865>
Author
heikki
Date
2006-06-07 17:42:10 -0700 (Wed, 07 Jun 2006)
Log Message
Simplify sharing and subscribing tests. Neither is actually
used currently.
Modified Paths
* trunk/chandler/tools/QATestScripts/Functional/FunctionalTestSuite.py
<#trunkchandlertoolsQATestScriptsFunctionalFunctionalTestSuitepy>
* trunk/chandler/tools/QATestScripts/Functional/TestSharing.py
<#trunkchandlertoolsQATestScriptsFunctionalTestSharingpy>
* trunk/chandler/tools/QATestScripts/Functional/TestSubscribe.py
<#trunkchandlertoolsQATestScriptsFunctionalTestSubscribepy>
Diff
Modified:
trunk/chandler/tools/QATestScripts/Functional/FunctionalTestSuite.py
(10864 => 10865)
--- trunk/chandler/tools/QATestScripts/Functional/FunctionalTestSuite.py
2006-06-08 00:14:03 UTC (rev 10864)
+++ trunk/chandler/tools/QATestScripts/Functional/FunctionalTestSuite.py
2006-06-08 00:42:10 UTC (rev 10865)
@@ -51,6 +51,7 @@
"TestRemoveFromTrashOnImport.py",
"TestEnableTimezones.py",
"TestSwitchTimezone.py",
+ "TestSubscribe.py",
"TestBlocks.py",
]
@@ -80,6 +81,7 @@
"TestRemoveFromTrashOnImport.py", #not tested on all platforms yet
"TestSwitchTimezone.py", #new test not yet working
"TestSharing.py", # bug 5889
+ "TestSubscribe.py", # new test not yet working
)
}
Modified:
trunk/chandler/tools/QATestScripts/Functional/TestSharing.py
(10864 => 10865)
--- trunk/chandler/tools/QATestScripts/Functional/TestSharing.py
2006-06-08 00:14:03 UTC (rev 10864)
+++ trunk/chandler/tools/QATestScripts/Functional/TestSharing.py
2006-06-08 00:42:10 UTC (rev 10865)
@@ -19,7 +19,6 @@
try:
# action
# Webdav Account Setting
- logger.Start("WebDAV account setting")
ap = QAUITestAppLib.UITestAccounts(logger)
ap.Open() # first, open the accounts dialog window
ap.CreateAccount("WebDAV")
@@ -32,36 +31,25 @@
ap.ToggleValue("ssl", False)
ap.ToggleValue("default", True)
ap.Ok()
- logger.Stop()
# verification
ap.VerifyValues("WebDAV", uw("Sharing Test WebDAV"), displayName = uw("Sharing Test WebDAV"), host =
"qacosmo.osafoundation.org", username = "demo1", password="ad3leib5", port=8080)
-
# import events so test will have something to share even when run by itself
path =
os.path.join(os.getenv('CHANDLERHOME'),"tools/QATestScripts/DataFiles")
# Upcast path to unicode since Sharing requires a unicode path
path = unicode(path, 'utf8')
share = Sharing.OneTimeFileSystemShare(path, u'testSharing.ics',
ICalendar.ICalendarFormat, itsView=App_ns.itsView)
- logger.Start("Import testSharing Calendar")
- try:
- collection = share.get()
- except:
- logger.Stop()
- logger.ReportException("Importing calendar")
- else:
- App_ns.sidebarCollection.add(collection)
- User.idle()
- logger.Stop()
- logger.ReportPass("Importing calendar")
+ collection = share.get()
+ App_ns.sidebarCollection.add(collection)
+ User.idle()
# Collection selection
sidebar = App_ns.sidebar
QAUITestAppLib.scripting.User.emulate_sidebarClick(sidebar, "testSharing")
# Sharing dialog
- logger.Start("Sharing dialog")
collection =
Block.findBlockByName("MainView").getSidebarSelectedCollection()
if collection is not None:
if sidebar.filterKind is None:
@@ -80,8 +68,6 @@
win.OnPublishDone(None)
wx.GetApp().Yield()
logger.SetChecked(True)
- logger.Report("Sharing dialog")
- logger.Stop()
# cleanup
# cosmo can only handle so many shared calendars
@@ -92,4 +78,5 @@
finally:
# cleaning
+ logger.Report('Sharing')
logger.Close()
Modified:
trunk/chandler/tools/QATestScripts/Functional/TestSubscribe.py
(10864 => 10865)
--- trunk/chandler/tools/QATestScripts/Functional/TestSubscribe.py
2006-06-08 00:14:03 UTC (rev 10864)
+++ trunk/chandler/tools/QATestScripts/Functional/TestSubscribe.py
2006-06-08 00:42:10 UTC (rev 10865)
@@ -13,11 +13,11 @@
try:
# action
# Webdav Account Setting
- logger.Start("WebDAV account setting")
ap = QAUITestAppLib.UITestAccounts(logger)
ap.Open() # first, open the accounts dialog window
ap.CreateAccount("WebDAV")
- ap.TypeValue("displayName", uw("Subscribe Test WebDAV"),
+ displayName = uw("Subscribe Test WebDAV")
+ ap.TypeValue("displayName", displayName)
ap.TypeValue("host", "qacosmo.osafoundation.org")
ap.TypeValue("path", "home/demo1")
ap.TypeValue("username", "demo1")
@@ -26,13 +26,11 @@
ap.ToggleValue("ssl", False)
ap.ToggleValue("default", True)
ap.Ok()
- logger.Stop()
# verification
- ap.VerifyValues("WebDAV", uw("Subscribe Test WebDAV"), displayName = uw("Subscribe Test WebDAV"), host =
"qacosmo.osafoundation.org", path = "home/demo1", username = "demo1", password="ad3leib5", port=8080)
+ ap.VerifyValues("WebDAV", displayName, displayName = displayName, host = "qacosmo.osafoundation.org",
path = "home/demo1", username = "demo1", password="ad3leib5", port=8080)
# Subscribe dialog
- logger.Start("Subscribe dialog")
window = SubscribeCollection.Show(wx.GetApp().mainFrame,
view=App_ns.itsView, modal=False)
window = wx.FindWindowByLabel("Subscribe to Shared Collection")
@@ -42,18 +40,15 @@
QAUITestAppLib.scripting.User.emulate_typing("http://qacosmo.osafoundation.org:8080/home/demo1/importTest-1?ticket=g0kplikch1")
window.OnSubscribe(None)
User.idle()
- logger.Stop()
# verification
- logger.SetChecked(True)
if QAUITestAppLib.scripting.User.emulate_sidebarClick(App_ns.sidebar,
"importTest"):
logger.ReportPass("(On Subscribe collection)")
else:
logger.ReportFailure("(On Subscribe collection)")
+ logger.SetChecked(True)
- # report the results from checking
- logger.Report("Sidebar")
-
finally:
#cleaning
+ logger.Report("Subscribe")
logger.Close()
_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev