Google Summer of Code 2023: MIT AppInventor — Reshu Kumari

Reshu kumari
3 min readAug 25, 2023

About Mit AppInventor

Mit Appinventor is an interactive platform where you can build applications without prior knowledge of coding. It provides us with a lot of tools and components that help us in building Apps in no time. To know more about Mit AppInventor you can visit its website.

Introduction to my GSoC Project with Mit AppInventor

I worked on Automated unit testing on the Mit Appinventor codebase. In brief, the project included introducing Jacoco code coverage, writing Junit tests for some functionalities, and selenium testing for user flow.

GSoC Proposal link — here

Now, discussing the whole GSoC in detail let’s start with milestone 1

Milestone 1

The question arises as to why we even need unit testing for our software applications. The unit testing plays a crucial role in maintaining the product quality and enhancing the development process. It also makes our maintenance process more effortless and acts as a safety net when introducing new changes.

The first task was setting up Jacoco on the MIT AppInventor’s ant-based project. We created a report which tells us the percentage of covered lines by the unit tests. The Jacoco coverage report doesn’t take long at all to generate as they are created while we are running our unit tests.

The above image is of the coverage report. It tells the percentage of covered code and how much is missed that we need to test. We can navigate through the files to check the exact lines which are covered.

The lines for which tests are not written will be highlighted in red. The green highlight shows the code has tests and yellow for partially tested.

After setting up the Jacoco, I wrote Junit tests for the settings functionality in the appinventor. PRs for the following

PR for Jacoco setup — PR 2894

PR for Junit tests — PR 2906

Milestone 2

For the next milestone, we planned to do some automated selenium testing. As it would also help us test the user experience and the UI. We used the Selenium web driver to perform browser automation on the real browser to test. We can test user interactions like clicking buttons, navigating pages, verifying expected outcomes, etc. In our case we tried to replicate the tests something like the user logging in, creating a new project, using the MIT AppInventor components to create the project, and then logging out.

Test outcome demo link.

PR for selenium tests — PR 2974

Future Plans

We will be extending the selenium tests to test more user flows. We can also write more Junit tests to achieve a higher code coverage percentage.

My Experience

I had a really great time working with MIT AppInventor. The GSoC period was full of learning. The mentors were very supportive and helpful.

Thank you for reading this, If you have any doubts or wanna discuss anything feel free to connect!!!

--

--