GithubHelp home page GithubHelp logo

dog-app's Introduction

android-test

Logic of app:

  1. At the start of the application, an API call is made to get the list of dogs.
  2. For Search, First it will go through the data that is shown to user to check if any name contains the keyword.
  3. If no result is found from step [2] it would call the search api with query param to get the list of items.

At the start of the app internet should be connected in order to fetch the data, otherwise internet error message shown to user. This application supports both the orientation. The test case coverage for ViewModel/Business logic is over ~85%.

  • MVVM: Used MVVM with ViewModel and LiveData to maintain updated state of UI during configuration change. ViewModel has used UDF and ViewState to maintain a single point of communication rather than exposing multiple livedata objects.
  • Kotlin: Used Kotlin for business, view, and test cases 100%.
  • RxJava : To fetch the response from API.
  • Retrofit : Called API with query params.
  • Dagger : Dependency injector.
  • Mockito : Tested ViewModel since it is handling business logic to call api etc. The code coverage for ViewModel is 94% line coverage%.

Note: If I had more time I could have done the better job in UI. I could have made this application connection aware.

What things I will do before going to PROD:-

  1. More alerting and logging to see the user behaviour.
  2. A/B testing with alternative UI. Fallback UI if API is down or error cases.
  3. It depends if API provide pagination capability or not.
  4. Use ROOM to store data as data might become big in PROD.
  5. Add e2e test cases.

Test Report https://github.com/Jaggrat-Singh/dog-app/blob/main/report.png

dog-app's People

Contributors

jaggrat-singh avatar jaggratsingh 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.