Dan Steinicke wrote:
> 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.

The logger.start/stop confuse me I guess. I thought they were meant for
performance tests only, but I guess not.

I don't think the goal itself is to report discrete actions, but report
an error as accurately as possible and with enough information to take
action when an error happens. Perhaps logger.start/stop help in that,
but they confuse me if they are used for that purpose.

Assuming logger.start/stop can be used to note that a section of the
test passed/didn't pass, one must still think when their use makes
sense. For example, in the case below I don't think logger.start/stop
add any value, because immediately after that block is an actual
verification check of the values that were set in that block, and if
something was raised before the verification line we would get a trace:

-    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)

Logs should be as short as possible but no shorter. Logs should be as
easy to read as possible.

Another example:

-    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()

If the get() or add() raises an exception, the trace is reported, so no
need to log or report further.

If you think some of my changes make it harder to find what is wrong,
please let me know specifically what and why that is the case.

-- 
  Heikki Toivonen


Attachment: signature.asc
Description: OpenPGP digital signature

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to