Re: How to make a unit test which involves a dialog
Hi, On 13/10/20 23:13, Regina Henschel wrote: > This is a great offer, which I gladly accept. Many thanks for such > support. UItest submitted to gerrit: https://gerrit.libreoffice.org/c/core/+/104277 -- Xisco Faulí LibreOffice QA Team IRC: x1sc0 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: How to make a unit test which involves a dialog
Hi Regina, On Tue, Oct 13, 2020 at 03:02:33PM +0200, Regina Henschel wrote: > the patch for which I want to make a unit test is in > https://gerrit.libreoffice.org/c/core/+/104234 > > The error is produced, when you set a new width or height for a horizontal > or vertical line in the Position dialog in Calc. So how can I use the > Position dialog in a unit test? Is it possible with C++? Note that your patch modifies SdrEditView::ResizeMultMarkedObj(), so calling that member function directly from a cppunit test without a dialog is also an option. One technique is putting a breakpoint on the function, then seeing the backtrace of it, so you can see what internal API the dialog uses (it may or may not call ResizeMultMarkedObj() directly) and then perform the same API calls from cppunit, without a dialog. See e.g. testTdf111522() in sd/qa/unit/uiimpress.cxx, you can get the sd::ViewShell of a loaded document, and its GetView() will give you an SdrView, which may make it possible to invoke various SdrEditView member functions. Regards, Miklos ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: How to make a unit test which involves a dialog
Hi Xisco, Xisco Fauli schrieb am 13-Oct-20 um 21:11: Hi Regina, oh, I didn't know you were on Windows. Unfortunately the logging is not supported there, see https://wiki.documentfoundation.org/Development/UITests#Unsupported_ui_items OTOH, I can create the UItest for you once you submit the patch if you want to avoid the hassle of switching to Linux and building LibreOffice there. This is a great offer, which I gladly accept. Many thanks for such support. Kind regards Regina Regards On 13/10/20 18:36, Regina Henschel wrote: Hi Xisco, Xisco Fauli schrieb am 13-Oct-20 um 16:43: Hi Regina, You can use a UItest for that. Launch LibreOffice with LO_COLLECT_UIINFO="test.log" instdir/program/scalc, follow the steps to reproduce the issue and you will have the action log in instdir/uitest/test.log. You have information on how to run uitests here: https://wiki.documentfoundation.org/Development/UITests#Running_the_test I can launch LibreOffice, I see the folder uitest, but I do not get a file "test.log". Might it be, that it works only on Linux? I work on Windows 10 with Cygwin. Kind regards Regina Regards On 13/10/20 15:02, Regina Henschel wrote: Hi all, the patch for which I want to make a unit test is in https://gerrit.libreoffice.org/c/core/+/104234 The error is produced, when you set a new width or height for a horizontal or vertical line in the Position dialog in Calc. So how can I use the Position dialog in a unit test? Is it possible with C++? Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: How to make a unit test which involves a dialog
Hi Regina, oh, I didn't know you were on Windows. Unfortunately the logging is not supported there, see https://wiki.documentfoundation.org/Development/UITests#Unsupported_ui_items OTOH, I can create the UItest for you once you submit the patch if you want to avoid the hassle of switching to Linux and building LibreOffice there. Regards On 13/10/20 18:36, Regina Henschel wrote: > Hi Xisco, > > Xisco Fauli schrieb am 13-Oct-20 um 16:43: >> Hi Regina, >> >> You can use a UItest for that. >> >> Launch LibreOffice with LO_COLLECT_UIINFO="test.log" >> instdir/program/scalc, follow the steps to reproduce the issue and you >> will have the action log in instdir/uitest/test.log. >> >> You have information on how to run uitests here: >> https://wiki.documentfoundation.org/Development/UITests#Running_the_test >> > > I can launch LibreOffice, I see the folder uitest, but I do not get a > file "test.log". > Might it be, that it works only on Linux? I work on Windows 10 with > Cygwin. > > Kind regards > Regina > >> Regards >> >> On 13/10/20 15:02, Regina Henschel wrote: >>> Hi all, >>> >>> the patch for which I want to make a unit test is in >>> https://gerrit.libreoffice.org/c/core/+/104234 >>> >>> The error is produced, when you set a new width or height for a >>> horizontal or vertical line in the Position dialog in Calc. So >>> how can I use the Position dialog in a unit test? Is it possible >>> with C++? >>> >>> Kind regards >>> Regina >>> ___ >>> LibreOffice mailing list >>> LibreOffice@lists.freedesktop.org >>> https://lists.freedesktop.org/mailman/listinfo/libreoffice >> > > ___ > LibreOffice mailing list > LibreOffice@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/libreoffice -- Xisco Faulí LibreOffice QA Team IRC: x1sc0 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: How to make a unit test which involves a dialog
Hi Xisco, Xisco Fauli schrieb am 13-Oct-20 um 16:43: Hi Regina, You can use a UItest for that. Launch LibreOffice with LO_COLLECT_UIINFO="test.log" instdir/program/scalc, follow the steps to reproduce the issue and you will have the action log in instdir/uitest/test.log. You have information on how to run uitests here: https://wiki.documentfoundation.org/Development/UITests#Running_the_test I can launch LibreOffice, I see the folder uitest, but I do not get a file "test.log". Might it be, that it works only on Linux? I work on Windows 10 with Cygwin. Kind regards Regina Regards On 13/10/20 15:02, Regina Henschel wrote: Hi all, the patch for which I want to make a unit test is in https://gerrit.libreoffice.org/c/core/+/104234 The error is produced, when you set a new width or height for a horizontal or vertical line in the Position dialog in Calc. So how can I use the Position dialog in a unit test? Is it possible with C++? Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: How to make a unit test which involves a dialog
Hi Regina, You can use a UItest for that. Launch LibreOffice with LO_COLLECT_UIINFO="test.log" instdir/program/scalc, follow the steps to reproduce the issue and you will have the action log in instdir/uitest/test.log. You have information on how to run uitests here: https://wiki.documentfoundation.org/Development/UITests#Running_the_test Regards On 13/10/20 15:02, Regina Henschel wrote: > Hi all, > > the patch for which I want to make a unit test is in > https://gerrit.libreoffice.org/c/core/+/104234 > > The error is produced, when you set a new width or height for a > horizontal or vertical line in the Position dialog in Calc. So > how can I use the Position dialog in a unit test? Is it possible > with C++? > > Kind regards > Regina > ___ > LibreOffice mailing list > LibreOffice@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/libreoffice -- Xisco Faulí LibreOffice QA Team IRC: x1sc0 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
How to make a unit test which involves a dialog
Hi all, the patch for which I want to make a unit test is in https://gerrit.libreoffice.org/c/core/+/104234 The error is produced, when you set a new width or height for a horizontal or vertical line in the Position dialog in Calc. So how can I use the Position dialog in a unit test? Is it possible with C++? Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice