{"id":26965630,"url":"https://github.com/santimattius/android-testing","last_synced_at":"2025-04-03T07:30:31.780Z","repository":{"id":160678543,"uuid":"609651456","full_name":"santimattius/android-testing","owner":"santimattius","description":"Example of Android Testing for Medium Articles","archived":false,"fork":false,"pushed_at":"2025-02-12T23:38:13.000Z","size":6597,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T00:28:33.157Z","etag":null,"topics":["android","testing","testing-android-fragments"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santimattius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-04T20:27:06.000Z","updated_at":"2025-02-12T00:22:36.000Z","dependencies_parsed_at":"2025-01-05T20:25:40.769Z","dependency_job_id":"551a3006-008b-46d1-bf2c-e4fdc37bf6ad","html_url":"https://github.com/santimattius/android-testing","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santimattius%2Fandroid-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santimattius%2Fandroid-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santimattius%2Fandroid-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santimattius%2Fandroid-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santimattius","download_url":"https://codeload.github.com/santimattius/android-testing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246955893,"owners_count":20860379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","testing","testing-android-fragments"],"created_at":"2025-04-03T07:30:31.251Z","updated_at":"2025-04-03T07:30:31.767Z","avatar_url":"https://github.com/santimattius.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧨​ Android Testing [update in progress] 🧨​\n\u003c!-- \nThis is a template to build an Android app applying good practices and testable architecture.\n\n![pyramid](https://github.com/santimattius/android-testing/assets/22333101/2c4b30e2-b31c-4fe4-bb67-c947dedb4ca8)\n\n\n## Screenshot\n --\u003e\n\u003cp align=\"center\"\u003e\n\n  \u003cimg height=\"600\" src=\"https://github.com/santimattius/android-testing/blob/master/screenshoot/entertainment_app.png?raw=true\" alt=\"App Capture\"/\u003e\n\n\u003c/p\u003e\n\n\u003c!-- \n## Unit Tests to Avoid\nSome unit tests should be avoided because of their low value:\n\n- Tests that verify the correct operation of the framework or a library, not your code.\n- Framework entry points such as activities, fragments, or services should not have business logic so unit testing shouldn't be a priority. Unit tests for activities have little value, because they would cover mostly framework code and they require a more involved setup. Instrumented tests such as UI tests can cover these classes.\n- \n[Intro to Unit Testing on Android (Spanish)](https://github.com/santimattius/android-testing/files/11521079/Intro.a.Unit.Testing.en.Android-1.pdf)\n\n## Integration Testing\nIntegration or intermediate level tests are tests that validate the interactions between stack levels within a module or the interactions between related modules.\n\nCheck more content, here: [Intro to Integration Testing on Android (Spanish)](https://github.com/santimattius/android-testing/files/11521077/Intro.a.Tests.de.Integracion.en.Android-1.pdf)\n --\u003e\n## Content\n\nTheMovieDB API: Check this [documentation](https://www.themoviedb.org/documentation/api).\n\n## Setup\n\nUsing local properties for define api key:\n\n```properties\napiKey=\"{your-api-key}\"\n```\n\n## Verification\n\nRun check project:\n\n```shell\n\u003e ./gradlew check\n```\n\nRun tests project:\n\n```shell\n\u003e ./gradlew test\n```\n\u003c!-- \n## Dependencies\n\nBelow you will find the libraries used to build the template and according to my criteria the most\nused in android development so far.\n\n- **[Retrofit](https://square.github.io/retrofit/)**, networking.\n- **[Gson](https://github.com/google/gson)**, json parser.\n- **[Glide](https://github.com/bumptech/glide)**, with image loader.\n- **[Coil](https://coil-kt.github.io/coil/compose/)**, with image loader for Jetpack compose.\n- **[Kotlin coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html)**.\n- Testing\n  -  [Mockk](https://mockk.io/)\n  -  [MockWebServer](https://github.com/square/okhttp/tree/master/mockwebserver)\n  -  [Room Testing](https://developer.android.com/training/data-storage/room/testing-db)\n  -  [Android Testing Library](https://developer.android.com/training/testing/local-tests)\n  -  [Robolectric](https://robolectric.org/)\n  -  [Espresso](https://developer.android.com/training/testing/espresso)\n  -  [Jetpack Compose Testing API](https://developer.android.com/jetpack/compose/testing) \n--\u003e\n## References\n\n- [Guide to app architecture](https://developer.android.com/jetpack/guide)\n- [Android developers](https://developer.android.com/)\n- [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)\n- [Clean Code](https://blog.cleancoder.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantimattius%2Fandroid-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantimattius%2Fandroid-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantimattius%2Fandroid-testing/lists"}