Posts

GSoC final report

Image
  Overview The idea of this GSoC project was to implement new Domain-Specific language for LibreOffice to be used in UI testing by logging the user interactions with LO applications then generate the python code needed for the python UI framework which will make testing easier. Also, the project aims to improve the logger that logs all the user interaction to be logged in the new DSL syntax to be more readable. Then we can use this replaying all the user interactions as a UI test. Achievements Grammar of new DSL done for starter_commands uno_commands dialog_commands  General_commands   Grammar that are general for all application. UI_Object_commands This support: ButtonUIObject EditUIObject CheckBoxUIObject RadioButtonUIObject  ListBoxUIObject  ComboBoxUIObject SpinUIObject  TabControlUIObject Special_commands This is for the logging of different applications actions: Writer Type Select GOTO page Calc Type Select cell or range laun

UI Logger

This post is just documentation for GSoC Project of UI logger here: https://summerofcode.withgoogle.com/projects/#5252265672179712 This project is to generate a new easier Domain-Specific_language for logging the user interactions to be able to convert it to a python script that used by python UI framework for testing. This project made with Textx which is a meta-language for building Domain-Specific Languages (DSLs) in Python. it helps you build your textual language in an easy way. You can invent your own language or build support for already existing textual language or file format. If you need to understand how the project is written and mainly the part in this folder: https://opengrok.libreoffice.org/xref/core/uitest/ui_logger_dsl/ I think you can easily see the tutorials here of TextX. The basics of this tutorial that you can understand with 30 mins can let you understand a lot of the project. WHY DSL? DSL is a very useful thing because it lets us understand the code

Week 12 Report

This week: 1) It was The last week of GSoC program. Raal was working on testing all the project and the generated files and I help him by solving some bugs or add anything. add the SideBar implementation: their was no implementation for the sidebar commands to be converted to uitest so here I added the implementation of it: https://gerrit.libreoffice.org/#/c/77653/ Ignore the logging part of the QuerySaveDialog while closing the app: as it is not important for a uitest to make in every test simulation of asking the user for saving the document or not. This can be found here: https://gerrit.libreoffice.org/#/c/77615/ Use prefix for names that has conflict with python's words: avoid using a reserved work of the python words to avoid making variable that name is 'if' or any of these words. This can be found here: https://gerrit.libreoffice.org/#/c/77557/ Replace tabs with spaces: as LO uses spaces . This can be found here: https://gerrit.libreoffice.org/#/c/77539/  Ad

Week 11 Report

Image
This week: 1) I have worked in solving the problem of un-named parent : For example, if I open calc and select any cell you will find a field in the upper tab that has the name of the cell for example C10. If I tried to type another name in this I will get this log statement: >>Type on 'pos_window' {"TEXT": "a"} from This means that the 'pos_window' edit UI object has a parent with no name. So how to solve it and how to generate a UI test Case that corresponds to this action as I know I should convert it to something like this: pos_window = [Parent_Name].getChild("pos_ window") pos_window.executeAction(" TYPE", mkPropertyValues({"TEXT": "a"})) This problem happens in many unexpected places and it makes the compiler stuck in running and not convert the logger to a UI test. The easiest fix is to change the logger to recursively query the parent until you find an element with a name. Usually

Week 10 Report

This week: 1) I tried to work on the Some draw and Impress to log more events on them but the problem was that they were having the same function that they call to perform similar operations. To Solve This for example for the: Add_Slide    ====> in impress Add_page    ====> in draw I add these events to the logger in this Commit: https://gerrit.libreoffice.org/#/c/76889/ So now we have these log Statements for examples: Insert new Slide at position 3   ====> in impress Insert new Page at position 3   ====> in draw 2) In the Same Commit (this one) I make a modification in the UITestLogger class to be able to know the difference between the draw and the Impress log statements and be able to store the current working app information. 3) Also add some new events to be supported with our UI logger like:  Impress Insert Slide Delete Side Duplicate Slide  Rename Slide Draw Insert Page Delete Page Rename Page This Work Can be found here:

Week 9 Report

First of all, This week was the second Evaluation Result of the Project and I am happy on working on this project and thanks to all LO family. This week: after the result it was only 3 days so I was worked on: 1) Test That Project is to work efficiently and ready to push on the master. I make this by generating many test cases by open the LO app and start to log some events and make sure that the corresponding generated test Case is working efficiently. I provide some of these in the last week Report So I will not attach images here. But the reason why I give this some time that I can say now that all the project is ready to be merged. 2) I was Update some parts of the grammar and adding meaningful comments to make the project well documented if we want to extend it later. This can be found in this Commit: https://gerrit.libreoffice.org/#/c/76510/ 3) Also, I have been trying to find out how to add an unsupported element to the UI python framework to be able to use it in makin

Week 8 Report

Image
This week: (The report may look very long but this is because of images only) I start testing the performance of the new UI logger. I tried this by opening the LO and start to make some actions and log the actions and convert it to a UI test. I will add here these examples of the generating logs that include most of the logger features and the corresponding generated python UI test. writer   these logs==>>  Generates this UI test ==>> Calc  these logs==>>  Generates this UI test ==>>  And by similarity, we can try math and impress... ============================================================== ============================================================== Also, I was having a problem 1) while trying to move between the UI Objects with the keyboard I got these old logs :  I worked on this and convert it to be: 2) Also solve some problems in UNO Commands that appears when you have 2 parameters. ========