Final Report

I spent my summer 2019 working on a project under VideoLAN as a Google Summer of Code student developer. I learnt tons of exciting stuffs working with the brilliant minds behind the world's best media player.

Abstract

This project aims to contribute to the stability of Android port of VLC, by writing test suites for the VLC android codebase, along with libVLC and medialibrary. This will ensure that the regressions are caught by developers at an early stage and the released application stays stable.

  • Write test suites around libVLC, medialibrary and the main android codebase, so that the core framework stays stable.
  • Write instrumentation tests for the application’s interface to ensure the correct behaviours of UI views.

Project @GSoC

Milestones Achieved

Summary

  • 4 commits merged and 19 commits in-review
  • 157 Unit tests and 90 UI tests

Details

  • Wrote Unit Tests for:

    • View Models
    • Browser Models
    • Medialibrary Models
    • Subtitle Model
    • History Model
    • Providers
    • Medialibrary Providers
    • Browser Providers
    • Utilities
    • Models Helper
  • Used Dependency Provider for injecting dependencies into tightly-coupled components, like fragments.
  • Implemented Abstract Factory Manager design pattern for dependency injection of LibVLC components.
  • Stubbed awkward components and generated stub data for unit tests.
  • Added UI tests for:

    • Browser fragments
    • Playlist screens
    • Preference screens
  • Wrote custom ViewMatchers for Media, Preferences etc.

Pull Requests

What's left to do?

  • Implement proper test coverage using Jacoco.
  • Integrate my unit tests with the Gitlab CI/CD pipeline.

Things I learned

  • Kotlin and co-routines
  • Principles of Testing and Importance of TDD
  • Stubbing and Mocking (Mockito and Mockk)
  • Working with NDK when compiling Android app
  • Various design patterns for dependency injection
  • Instrumentation tests (Espresso)

Signing off,
TheFaker

I would love to hear any constructive feedbacks for my contents, by any method you prefer - Medium, Gitalk or even email. If you do like my content, please  star my blog or follow me at Github.