KEcoLab: Sustainability 1: Testing and developement of "KEcoLab"
Project abstract
KEcoLab: Sustainability 1: Testing and developement of "KEcoLab"
Following are the deliverables:
- Integrate Okular sus scripts into Okular's Pipeline (Solves #2)
- Integrate CI/CD pipelines with E2E tests or Integration tests (Solves #10):
- Have Kate/Okular scripts(xdotool, Selenium and KdeEcoTest) which would be a CI test after each MR to make sure KEcoLab works well.
- To make sure energy requirement measured using all 3 scripts mentioned above remains constant with +-(5 to 10)% accuracy rate after every MR
- Usage scenario scripting with Selenium(Solves #5)
- Usage scenario scripts with KdeEcoTest
Proposal
- Have Okular usage scenario scripts similar to Kate: Following usage scenarios can be tested to test the performance:
- Browsing to the end of the document
- Search something using the find toolbar
- Zoom in and Zoom out
- Creating an inline note
- Bookmarking a page
- Area Selection
- Closing and opening a new document
- Presentation Mode
- Area Selection
NOTE I suggest using either dotool(supports both X and Wayland) or a combination of ydotool(Supports Wayland only) and xdotool(Supports X11 only). If I had to choose between the two I'll go with dotool since it supports both X and Wayland and would also prevent code duplication.
- Integrate CI/CD Pipelines with E2E tests or Integration tests:
- Tbh I havent worked on CI/CD before but I think it would be a good opportunity for me to learn this and I'll refer the Gitlab's test automation pipeline and reporting for this.
- Also a suggestion if we do end up using dotool for writing usage scripts for okular, it would be beneficial for us to use them instead of kate's reasoning being a lot of the distro's are actively dropping X11 support including big names like Fedora which in its next version will stop support for X11 and also KDE Plasma itself supporting Wayland as the default option its suffice to say it will be beneficial for us in the long run.
- Also we can incorporate the selenium appium script into the pipeline as well similar to how Tokodon uses it.
- Usage scenario scripting with Selenium Webdriver using AT-SPI:
- I have read through the blog post regarding the same by Harold. I have some experience testing this out also I can refer the tests written by Rishi for Tokodon for this during his SoK experience.
- We can do either Okular or Kate for this. I'll suggest Okular since it already has the Blauer Engel for FOSS certification.
#4
Addressing the Wayland Support- To make use of KdeEcoTest and Selenium Webdriver using AT-SPI and also simultaneously support Wayland we'll have to wait for successful completion of adding Wayland support to both KdeEcoTest and Selenium Webdriver, I can look into this beyond the scope of this mentorship.
#8 and #3
AddressingSince I am not in Berlin, I cant really help out with this.
Timeline
17 Jan to 24 Jan
- I would start by setting up KdeEcoTest and Selenium on my 3 virtual machines (Kubuntu, Fedora and Ubuntu), this would allow us to test that the script works on all three simultaneously as I write them.
- I would also start communications with Okular team regarding integrating KEcoLab in their pipeline so they could test Okular before every release
- I would also be going through the current gitlab-ci.yml and looking at the template and understanding how they can be integrated.
- I would also start communications with KdeEcoTest contributors regarding the timeline on adding Wayland support
25 Jan to 1 Feb
- Continuation of Communication with Okular team regarding the specifics of the implementation in their pipeline.
- Continue understanding the gitlab-ci templates, the current pipeline and start with integrating the existing Kate scripts into the pipeline for E2E testing after every MR.
- Maintain communication with KdeEcoTest contributors regarding implmentation of Wayland support.
2 Feb to 9 Feb
OFF
- Will be attending and volunteering for KDE Conf which would be from 2nd to 4th Feb. Not sure about the dynamics of traveling yet but would probably be leaving before 2nd and might stay a couple days more before coming back.
10 Feb to 17 Feb
- Continue updating the pipeline to integrate the exiting Kate scripts.
- Start with integrating Okular SUS scripts into Okular repository.
- Start writing the Selenium tests for Okular or Kate.
- Maintain communication with KdeEcoTest contributors regarding implmentation of Wayland support.
18 Feb to 25 Feb
- Continue writing the Selenium tests for Okular or Kate
- Once completed look into integrating them with KEcoLab's pipeline to test after each merge request.
- Continue integrating Okular SUS scripts into Okular repository.
- Maintain communication with KdeEcoTest contributors regarding implmentation of Wayland support.
26 Feb to 4 March
- Start writing KdeEcoTest scripts for Okular or Kate
- Continue integrating Okular SUS scripts into Okular repository. [*Buffer]
- Maintain communication with KdeEcoTest contributors regarding implmentation of Wayland support.
5 March to 12 March
- Start writing KdeEcoTest scripts for Okular or Kate
13 March to 20 March
- Continue writing KdeEcoTest scripts for Okular or Kate
- Start integrating it in KEcoLab's pipeline to test after each merge request.
20 March to 31 March
- Buffer time for completing all the above deliverables.
- Will write blog posts for all the 3 deliverables and also update kde planet.
- Incorporate E2E test for having constant energy measurements across all three tests(xdotool, KdeEcoTest, Selenium)
References / relevant background info
I am a senior at Amity University UP, India. I am enthusiastic about open-source technologies, having started using Linux in my freshman year. My experience with various Linux distributions led me to Fedora SPIN with Kde Plasma as my daily driver. I've previously contributed to several C, C++, Qt/Qml and django projects. I was a GSoC student with KDE for Merkuro Project in 2023 under Carl Schwan and Claudio Cambra's mentorship(I am still an active contributor to Merkuro). I am an active part of local OSS communities in Delhi and I am also helping out in conducting KDE Conf India 2024.
I came across KDE Eco project during Akademy 2023 but could'nt contribute much back then due to time constraints but now I have been contributing to the project for a while.
- I have attended last 2/3 meetings related to KDE Eco in last few months.
- I tested out the test scripts for kate on Fedora, Kubuntu and Ubuntu and provided my findings in the Measurement Lab matrix chat.
- I also tested out the Selenium scripts during Akademy(it was asked in the Akademy channel) and provided my inputs to Allon (@allon:kde.org).
- I also made the PR to update the previously outdated test scripts.
- I also learnt the basics of Bash and R programming language in order to contribute to KEcoLab.
How to reach you
IRC: @aakarshmj:matrix.org
Gitlab: https://invent.kde.org/aakarshmj
Country: India (UTC + 5:30)
Email: mj.akarsh@gmail.com