Re: [gnome-desktop-testing] Mago logging



Hey James!

James Tatum wrote:
* Add a main index page linking to the test suites
* Show test logs from previous mago invocations
Cool. Those would be really nice features to have. The first, i.e. would be easy to implement and indeed would be helpful.
* 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)
Mmm, I don't think I like the idea of having mago wrappers for all ooldtp and ldtp methods. It would be too complex. Besides, that kind of information is already logged in the LDTP logs under /tmp/ldtp-<user>/, so we can try to think of a way of reading this. If finally we don't find a way to do this another way, I would prefer this to be implemented as decorators [1]

If we don't like the wording of the LDTP messages to the user, we might think about proposing changes in the LDTP code, instead. Nagappan (LDTP's main dev) is always happy to accept contributions.

For logging success, I think Nagappan made something similar for his tests. Nags, how do you do it? Do you put loggers calls within the code (that we want to avoid), or do you do something else?

Thanks,
Ara.

[1] http://www.artima.com/weblogs/viewpost.jsp?thread=240808



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]