Git Product home page Git Product logo

openmovie's Introduction

openMovie

Maintainability CI codecov

Show case Android practices using the Movie db

                 

Tech stack

  • 100% testable Kotlin code
  • Clean Multimodular Architecture
  • Presentation layer built based on Unidirectional data flow (UDF) and single entry points
  • Latest AGP 7+
  • Dagger Hilt
  • CI with Github actions
  • High test coverage using Unit, Instrumentation and Integration tests

Architecture

Multi modular project structure

Architecture This project aims for showcasing a multi modular architecture based on 2 concepts: Libraries and Features

  • Features contains all user facing functionality (e.g. Discover, Movie Details)
  • Libraries are shared modules that help the building of features (e.g. network, ui, test)

CI

In addition to static analysis and unit tests we are using a test matrix for each commit on master. and triggering all instrumentation tests for different API lvls

Testing strategy

Data Layer

The data layer is tested through a combination of unit tests + Mockwebserver in order to fully test Retrofit network integrations. By following this approach we are covering:

  • Retrofit instance
  • Json converters, in this case Kotlin Serialization converters
  • Network data sources

The main idea is to make sure that the whole network integration is working before starting to implement other areas of the application.

I've wrote an article explaining how this works in more depth

Domain Layer

For the domain layer the tests are standard unit tests focusing on outcome not implementation and using the correct test double for each case. Avoiding unecessary mocking of classes is proven to make unit tests faster. There's a good article about when to mock from uncle bob here

Presentation Layer

Finally the presentation layer is tested using the following strategy

  • Unit tests for VMs and mappers. Here mocks are used to cover the architectural boundaries (VM and Use cases)
  • Instrumentation tests for UI and integration. For those types of tests, the approach used is based Testing Robots

openmovie's People

Contributors

dependabot[bot] avatar horowitz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.