[gnome-desktop-testing] [Fwd: Re: Take a screen shot and save to the report folder]



Forwarding the response since I didn't put the mail list in copy, just in case
someone finds it interesting.

Best regards,
    Javier

-------- Original Message --------
Subject: Re: [gnome-desktop-testing] Take a screen shot and save to the report
folder
Date: Wed, 21 Oct 2009 00:01:02 +0800
From: Javier Collado <javier collado canonical com>
To: Wang Qi, Scott <wangqi s gmail com>
References: <88a4ac910910200746t39de96c9r89222bcde409d57 mail gmail com>

Hello Scott,

There's no documented way to do that. However, if you look at library and the
way the discovery module is used, you could the log files for every suite in the
following way:
--------------
from mago.cmd.discovery import discover_applications

apps = discover_applications(['/usr/share/mago-test'],
                             [args.application], [], [], [])

target_dir = os.path.realpath(os.path.expanduser("~/.mago"))

log_files = []
for app in apps:
    application_target_dir = app.get_target_directory(target_dir)

    # Gather log filenames
    for suite in app.suites():
        log_files.append(suite.get_log_filename(application_target_dir))
--------------

I hope this piece of code is useful to be adapted to your particular needs.

Best regards,
    Javier

Wang Qi, Scott wrote:
> Hi all,
> 
> Thanks for creating Mago. It really helps us to create test cases.
> 
> We are using mago+ldtp to drive the test cases for our application. Our
> application is written based on wxPython. Some of the customized UI control
> with complex hierarchy can not be recognized or controlled by LDTP. We have
> to generate the key strokes to let the application perform the task. We'd
> like to take some screen shoot and save it to the report folder together
> with each test case' report. Is there a mago-offical way to get the folder
> name of the test report?
> 
> Thanks
> Scott
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> http://live.gnome.org/DesktopTesting
> desktop-testing-list mailing list
> desktop-testing-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-testing-list



Attachment: signature.asc
Description: OpenPGP digital signature



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