Lbc-test-app - Test Android Senior Leboncoin

Related tags

Testing lbc-test-app
Overview

Test Android Senior Leboncoin 🤖

Mathieu EDET

Overview

Min API version : 24

This application is designed to display list of songs (fetched from remote JSON at runtime).

  {
    "id": Int,
    "albumId": Int,
    "title": String,
    "url": String,
    "thumbnailUrl": String
  }

It was not specified what to do with albumId, I decide to make a "details" view with selected song title and all associated songs of the album. An index has been added on albumId field to make requests faster 🚀

Data is stored locally on database for an offline usage and to be displayed faster at app runtime when remote data is not fetched yet. Image are cached too with Glide.

The single source of truth is database.

Main dependencies selection

For data persistence I have chose to use Room. This ORM provides an abstraction layer over SQLite to allow database data access easily. Its configuration is done via annotations to our persisted entities. Room allows database schema versionning via migrations (not implemented on this test). SQLite queries has to be write manually but there is compile time verification.

For HTTP requests, I have chose Retrofit2 (with http client OkHttp). Developed by Square, it's a own type-safe HTTP library with a big community. This lib seems to be the better one for REST APIs. It can be configured with custom converter : gson on my test (a Java serialization/deserialization library developped by Google), provides good performances to deserialize JSON data.

Image caching : Glide is an image loading library. Google is owner of this one and recommand to use it. It provides great performances for a simple usage.

Additionnally, I use data binding for cleaner fragments / activities and simplify update. Databinding/viewmodel are really efficients together.

Notes

I use product behavior to separate differents environment (there is only one env on this test, but we could have few environment later) with configuration for each one. For now, I store asset root url on this one. I use this product flavor to add prefix to application name and version (simplify environment switching and test on a same device).

If you have any question about this project, please send me a message : [email protected]

You might also like...
TestObserver to easily test LiveData and make assertions on them.
TestObserver to easily test LiveData and make assertions on them.

JCenter Update LiveData Testing is currently published on JCenter - it will serve packages until February 1st, 2022. LiveData Testing packages will be

PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.
PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.

Writing unit tests can be hard and sometimes good design has to be sacrificed for the sole purpose of testability. Often testability corresponds to go

Powerful, elegant and flexible test framework for Kotlin with additional assertions, property testing and data driven testing
Powerful, elegant and flexible test framework for Kotlin with additional assertions, property testing and data driven testing

Kotest is a flexible and comprehensive testing tool for Kotlin with multiplatform support. To learn more about Kotest, visit kotest.io or see our quic

Strikt is an assertion library for Kotlin intended for use with a test runner such as JUnit, Minutest, Spek, or KotlinTest.

Strikt is an assertion library for Kotlin intended for use with a test runner such as JUnit, Minutest, Spek, or KotlinTest.

Barista makes developing UI test faster, easier and more predictable. Built on top of Espresso
Barista makes developing UI test faster, easier and more predictable. Built on top of Espresso

Barista makes developing UI test faster, easier and more predictable. Built on top of Espresso, it provides a simple and discoverable API, removing most of the boilerplate and verbosity of common Espresso tasks. You and your Android team will write tests with no effort.

Test for openbank application

openbank-test Test for openbank application Here you can find a simple test for the OpenBank application. It fetches some characters from the Marvel A

Proyecto de Kotlin y JPA sobre Hibernate, con algunos test usando JUnit 5 y Mockito.
Proyecto de Kotlin y JPA sobre Hibernate, con algunos test usando JUnit 5 y Mockito.

Contactos Kotlin JPA Ejemplos de una aplicación de manejo de contactos con Kotlin y JPA. Usando para testear la aplicación JUnit 5 y Mockito. Almacena

Slow-kotest - Demonstration that kotest is very slow during test instantiation

This project demostrates the slow start time for simple kotest unit tests. the c

Test Automation of Energy Australia - Web application

Test Automation of Energy Australia - Web application Technology used - Kotlin, Java, Espresso, Android Run the test on local environment git clone ht

Owner
null
Toster - Small test dsl based on adb commands that allows you to test the mobile application close to user actions

toster Small test dsl based on adb commands that allows you to test the mobile a

Alexander Kulikovskiy 31 Sep 1, 2022
null 866 Dec 27, 2022
Linkester is an Android library that aims to help Android developers test their deep links implementation.

Linkester Linkester is an Android library that aims to help Android developers test their deep links implementation. The idea is to have a new launche

Ahmad Melegy 79 Dec 9, 2022
A powerful test framework for Android

Cafe A powerful test framework for Android named Case Automated Framework for Everyone. Home Page http://baiduqa.github.com/Cafe/ How to make Cafe dow

Baidu 367 Nov 22, 2022
A custom instrumentation test runner for Android that generates XML reports for integration with other tools.

Android JUnit Report Test Runner Introduction The Android JUnit report test runner is a custom instrumentation test runner for Android that creates XM

Jason Sankey 148 Nov 25, 2022
A powerful test framework for Android

Cafe A powerful test framework for Android named Case Automated Framework for Everyone. Home Page http://baiduqa.github.com/Cafe/ How to make Cafe dow

Baidu 367 Nov 22, 2022
Easily scale your Android Instrumentation Tests across Firebase Test Lab with Flank.

Easily scale your Android Instrumentation Tests across Firebase Test Lab with Flank.

Nelson Osacky 220 Nov 29, 2022
The coding challenge elbotola android test

Introduction The coding challenge(s) below will be used to assess your familiarity with the Android development environment, relevant Android related

Mohamed Elouamghari 1 Nov 2, 2021
Android background tint test project

Android Background Tint References https://developer.android.com/reference/android/view/View#attr_android:background https://developer.android.com/ref

Ashwin Dinesh 0 Nov 4, 2021
PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.

Writing unit tests can be hard and sometimes good design has to be sacrificed for the sole purpose of testability. Often testability corresponds to go

PowerMock 3.9k Jan 5, 2023