Jump to content

SoK/2023/StatusReport/Nitin Tejuja

From KDE Community Wiki

Measurement of energy consumption with Selenium

Project Type: Coding

Introduction and Abstract: In this project, we are setting up Selenium using Selenium AT-SPI and replicating an existing unit test written with KdeEcoTest to test the educational software suite GCompris, which provides a number of activities for children aged 2 to 10. By measuring then comparing the energy needed by KdeEcoTest and Selenium we will be able to decide if and how we can use Selenium to run energy consumption scenarios. Selenium AT-SPI for QT is still in an early stage but it is relevant to KDE as a unit testing tool and could become a great tool for energy consumption measurement. In this project, I will be writing guide for installation of selenium-webdriver-at-spi and GCompris application scripts using selenium-webdriver-at-spi. The aim is to provide assistance to developers to create their own KDE application tests, either as a system testing tool or a energy measurement tool.

Mentors: Emmanuel Charruau, Harald Sitter

Blog Posts:

Season of KDE 2023 With KDE Eco: Setting Up Selenium For Energy Consumption Measurements

Season Of KDE 2023 With KDE Eco: Writing Scripts In Selenium To Reproduce KdeEcoTest Script

Files:

Installation Guide

Weekly Progress

WEEK 1 - 2 : For the first two weeks, I was working on understanding `KdeEcoTest` and exploring `selenium-webdriver-at-spi` before writing the unit test scripts. In the first week, I set up GCompris and explored the application's activities.In next week, I started writing unit test scripts using selenium-webdriver-at-spi and written an installation guide of selenium-webdriver-at-spi. I wrote about my experience and findings in the first two weeks on the blog post [1]

WEEK 3 - 4 : In these weeks, I learnt to write scripts for GCompris application activities in python using selenium-at-spi. I wrote a selenium script for "baby keyboard" activity and added accessiblity code to activity QML elements. I have also replicated the one behaviour of KdeEcoTestScript.

WEEK 5 - 6 : In these weeks, I have updated the documentation guide for installation of `selenium-webdriver-at-spi`. I wrote a selenium script for "Explore Farm Animals" activity and added accessiblity code to activity QML elements. I wrote blog post about my experience with writing scripts in selenium and can be found here[2]

WEEK 7 - 8 : In these weeks, I have added accessibility code to some generic elements like "cancelbutton", "applybutton". I wrote a selenium script for testing the "Explore World Music" activity and added accessiblity code to activity QML elements.

WEEK 9 - 10 : In these weeks, I wrote a selenium script for "Baby Word Processor" activity and added accessiblity code to activity QML elements.

WEEK 11- 12 : In these weeks, I merged all activities code in one script file like KdeEcoTestGCompris Script and added logs to script in OSCAR format. I have also started the writing step by step guide for how to write selenium scripts.

Community Bonding (SoK’23)

I want to thank everybody who makes Season of KDE possible, especially my mentors.

I am very thankful to Harald Sitter for enhancing [`selenium-webdriver-at-spi`](https://invent.kde.org/sdk/selenium-webdriver-at-spi) whenever I encountered a problem that required a new functionality.

CONTACT ME : I am available on Matrix : @nitin.tejuja12:matrix.org