[gnome-desktop-testing] Mago logging
- From: James Tatum <jtatum gmail com>
- To: desktop-testing-list gnome org
- Subject: [gnome-desktop-testing] Mago logging
- Date: Mon, 7 Sep 2009 15:52:47 -0400
I'm thinking about some changes I'd like to make to the logging interface and was looking for some input.
Michael Fletcher's comment in his merge proposal and Ara Pulido's response has kept the issue of LDTP exceptions in my head. I love the logs Mago generates but a few bug reports and other things have given me a short list of changes I'd like to code:
* Add a main index page linking to the test suites
* Show test logs from previous mago invocations
* Provide a lot more detail for each individual test case
The last bullet item may be one of the more challenging items to implement, and I wanted to solicit some feedback on approaches.
My idea is to allow you to expand a test case and see something like:
[Green checkmark] Click 'btnCancel'
[Green checkmark] Click 'mnuCopy'
[Green checkmark] Read contents of 'txtResultRegion'
[Red X] Click 'btnFind'
[The exception/backtrace could be displayed under that]
That way, the execution of the test can really be traced with a high level of detail, and we won't have to mess around with try/catch blocks for LdtpExceptions.
There are a lot of options for implementing it. The first one that came to mind was wrapping the ooldtp context object and doing a little bit of magic there. Perhaps instead of:
save_dialog = ooldtp.context(self.SAVE_DLG)
you might invoke:
save_dialog = magoldtp.context(self.SAVE_DLG, logger)
Subsequent calls such as:
save_dlg_btn_save = save_dialog.getchild(self.SAVE_DLG_BTN_SAVE)
save_dlg_btn_save.click()
would be wrapped, with magoldtp invoking ooldtp methods, catching and rethrowing exceptions, and using the logger object to record the results of each call.
Deep down, I'm thinking it would be a metaclass pattern wrapping the ooldtp stuff for ease and flexibility... but logging is problematic. Is there a better way to do this than passing some kind of logger instance around? I'm not thrilled with that idea. What do you guys think?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]