calc uitests

classic Classic list List threaded Threaded
3 messages Options
Dennis Francis Dennis Francis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

calc uitests

Hi Markus,

(moving my query from irc here)

1) I tried to create a uitest for calc as a testcase for https://bugs.documentfoundation.org/show_bug.cgi?id=108881

In that I load the document referenced in bugzilla which has an empty chart object.
Then I close that doc, and open a blank calc doc, but the uitest throws an exception
on running it. ( For now I have commented out code relevant to reproducing the tdf bug. )

The uitest case and backtrace shown are at https://pastebin.com/TbpfSJ8J

2) Another query is about debugging the uitest as explained in your blog 
is to run the uitest as shown in this script :
I was trying to do that but seems there is no python executable in instdir/program
in my debug build. Using system python does not seem to work.

Thanks for your help.

Regards,
Dennis


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Markus Mohrhard Markus Mohrhard
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: calc uitests

Hey Dennis,

On Mon, Jul 17, 2017 at 8:48 AM, Dennis Francis <[hidden email]> wrote:
Hi Markus,

(moving my query from irc here)

1) I tried to create a uitest for calc as a testcase for https://bugs.documentfoundation.org/show_bug.cgi?id=108881

In that I load the document referenced in bugzilla which has an empty chart object.
Then I close that doc, and open a blank calc doc, but the uitest throws an exception
on running it. ( For now I have commented out code relevant to reproducing the tdf bug. )

The uitest case and backtrace shown are at https://pastebin.com/TbpfSJ8J

 I have debugged this during the weekend a bit but it seems that during closing the document we crash. I'm not sure yet why but will need to spend a bit more time next weekend in looking at the problem. I don't have time until Thursday evening to look into the problem.



2) Another query is about debugging the uitest as explained in your blog 
is to run the uitest as shown in this script :
I was trying to do that but seems there is no python executable in instdir/program
in my debug build. Using system python does not seem to work.



For system python you need to set PYTHONPATH and URE_BOOTSTRAP either in the script or in your terminal. If called through the makefiles our build system already sets the values correctly.

Regards,
Markus

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Dennis Francis Dennis Francis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: calc uitests

Hi Markus


For system python you need to set PYTHONPATH and URE_BOOTSTRAP either in the script or in your terminal. If called through the makefiles our build system already sets the values correctly.


Thanks, I was able to run my test in debug mode.

When I run the following in a test case in debug mode, after the "CTRL+X" action has executed, the selected chart object is not disappearing. I can see that the selection action is working well though.
Any hints as to what I may be missing here ? Thanks.

doc = self.ui_test.load_file(get_url_for_data_file("tdf108881.ods"))
xGridWindow = self.xUITest.getTopFocusWindow().getChild("grid_window")
xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
print("Selected chart")
time.sleep(10)
xGridWindow.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+X"}))
print("Cut chart")
time.sleep(10)
self.ui_test.close_doc()


Regards,
Dennis

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Loading...