Search This Blog

GSoC work report - Week 7

During the 7th week, I sent 3 patches.1) Gerrit change #56776This change adds more features to the log interpreter. UNO commands, closing dialogs through buttons, sending UNO commands to open dialogs via keycode is now supported.2) Gerrit change #56777This change makes command-line argument parsing of interpreter more standard.3) Gerrit change #56789This change adds support for starting any of the 6 apps of LibreOffice through the create_doc_in_start_center() function.Let's also have a look at a log file and the generated test file. Log File -

Post a Comment

Popular posts from this blog

Overview
The idea of this GSoC project was to implement a feature which logs the interaction of users with the UI elements in an interpretable Domain Specific Language (DSL), and an interpreter which converts the log into a file into something which will help in replaying the user actions. The project involved working with the UI elements and the UI testing framework of LibreOffice.AchievementsThe logger -

The logging for the following is currently supported -The UI elements of Visual Component Library like Buttons, Checkboxes, Radio-buttons, Listboxes, Comboboxes, Spinbuttons, etc.Keys pressed in different UI elementsUNO commands sent with parametersSelection of ObjectsOpening of Sidebar/DeckSome application-specific events can also be logged -Writer - Goto Page, Set Zoom, Text SelectionCalc - Autofilter Launch, Selection of cells/range of cells, Switching of SheetMath - Selection of elements from the element selector panelImpress - Set ZoomAdditionally, the opening and closing of som…

This week, I first completed the patch - https://gerrit.libreoffice.org/#/c/57857/
This adds a new function to call UNO commands with parameters in the UI tests.

Then, I completed the patch - https://gerrit.libreoffice.org/#/c/57368/
This involved adding logging for the opening of sidebar/deck in the LO apps, changing the log for object selection and UNO commands to make them interpretable, and removing the function logObjectSelection to merge it in the logEvent function.

Now, I am working on improving the log interpreter - https://gerrit.libreoffice.org/#/c/58340/
This fixes a crash on certain inputs and adds support for interpreting UNO command parameters, along with some other minor changes.

Logging in LibreOffice is mainly handled by a class called UITestLogger, defined here. The logger class logs the user actions only if the member flag mbValid is set to true. The flag can be turned on by setting the environment variable LO_COLLECT_UIINFO to a file name where the logs should be collected (see the constructor of UITestLogger, defined here).

We maintain a pointer to an instance of UITestLogger class here. To use the logger object, the static function getInstance can be used to get access to the pointer.
The function logAction, defined in the same class, is used to log events from the classes which extend the class vcl::Control. The log statements corresponding to a particular class can be found in the function get_action of the UI wrapper classes. Most of the wrapper classes can be found with this OpenGrok search. The log statements get generated when VCL events get broadcasted. A list of the VCL events can be found in the enum class VclEventId here.
For other classes, w…