{"id":29228433,"url":"https://github.com/raimonizard/android-studio-testing-helloworld","last_synced_at":"2025-09-09T06:53:24.803Z","repository":{"id":287022850,"uuid":"962543952","full_name":"raimonizard/android-studio-testing-helloworld","owner":"raimonizard","description":"The purpose is to show how to setup instrumented tests for UI with Espresso and also also Unit Tests for the ViewModel.","archived":false,"fork":false,"pushed_at":"2025-04-09T15:39:25.000Z","size":4632,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T15:45:50.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/raimonizard.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":"2025-04-08T10:05:30.000Z","updated_at":"2025-04-09T15:39:29.000Z","dependencies_parsed_at":"2025-04-09T15:45:56.154Z","dependency_job_id":null,"html_url":"https://github.com/raimonizard/android-studio-testing-helloworld","commit_stats":null,"previous_names":["raimonizard/android-studio-testing-helloworld"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/raimonizard/android-studio-testing-helloworld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raimonizard%2Fandroid-studio-testing-helloworld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raimonizard%2Fandroid-studio-testing-helloworld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raimonizard%2Fandroid-studio-testing-helloworld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raimonizard%2Fandroid-studio-testing-helloworld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raimonizard","download_url":"https://codeload.github.com/raimonizard/android-studio-testing-helloworld/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raimonizard%2Fandroid-studio-testing-helloworld/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263307702,"owners_count":23446327,"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":[],"created_at":"2025-07-03T10:30:20.678Z","updated_at":"2025-07-03T10:30:25.074Z","avatar_url":"https://github.com/raimonizard.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android HelloWOrld App for unit cases testing and UI instrumental testing\n## Android Studio Version\nAndroid Studio Ladybug Feature Drop | 2024.2.2\n\n## Language\nKotlin with JetPack Compose\n\n## Purpose\nThis purpose of the **main** branch is a demo of unit cases testing and UI instrumental testing with JUnit4 for the Unit Testing over the ViewModel and Espresso for the Instrumental UI.\n\n---\n\n# Gradle dependencies\nIf you want to expand the current project and include MVVM pattern, which is already in place through the packages, it is necessary to add the following dependencies in the file [`app/build.gradle.kts`](app/build.gradle.kts):\n\n``` bash\ndependencies {\n    // Plataforma de versions Compose\n    implementation(platform(\"androidx.compose:compose-bom:2024.04.01\"))\n    implementation(platform(libs.androidx.compose.bom))\n    androidTestImplementation(platform(libs.androidx.compose.bom))\n\n    // ────────────────────────────────\n    // Unit Testing (JVM)\n    // ────────────────────────────────\n    testImplementation(\"androidx.arch.core:core-testing:2.2.0\")\n    testImplementation(libs.junit)\n\n    // ────────────────────────────────\n    // Instrumental UI Testing (emulador/dispositiu)\n    // ────────────────────────────────\n    androidTestImplementation(\"androidx.test.espresso:espresso-core\")\n    androidTestImplementation(\"androidx.test.ext:junit\")\n    androidTestImplementation(\"androidx.compose.ui:ui-test-junit4\")\n    androidTestImplementation(libs.androidx.espresso.core)\n    androidTestImplementation(libs.androidx.junit)\n    androidTestImplementation(libs.androidx.ui.test.junit4)\n\n    // ────────────────────────────────\n    // Debug Tools (només en debug)\n    // ────────────────────────────────\n    debugImplementation(\"androidx.compose.ui:ui-tooling\")\n    debugImplementation(\"androidx.compose.ui:ui-test-manifest\")\n    debugImplementation(libs.androidx.ui.tooling)\n    debugImplementation(libs.androidx.ui.test.manifest)\n\n    // ────────────────────────────────\n    // Implementació principal de l'app\n    // ────────────────────────────────\n    implementation(\"androidx.compose.runtime:runtime-livedata\")\n    implementation(\"androidx.compose.material3:material3\")\n    implementation(\"androidx.compose.ui:ui\")\n    implementation(\"androidx.lifecycle:lifecycle-runtime-ktx\")\n    implementation(\"androidx.activity:activity-compose\")\n\n    implementation(libs.androidx.core.ktx)\n    implementation(libs.androidx.lifecycle.runtime.ktx)\n    implementation(libs.androidx.activity.compose)\n    implementation(libs.androidx.ui)\n    implementation(libs.androidx.ui.graphics)\n    implementation(libs.androidx.ui.tooling.preview)\n    implementation(libs.androidx.material3)\n}\n```\n\n# Screenshots\n## MyView testTags():\n\u003cimg src=\"app/screenshot/MyView-testTag.png\" alt=\"MyView-testTag\" height=\"500\"/\u003e\n\n## Instrumental UI Tests:\n\u003cimg src=\"app/screenshot/HelloWorld-MyView-Instrumental-UI-Testing.gif\" alt=\"HelloWorld-MyView-Instrumental-UI-Testing\" height=\"300\"/\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraimonizard%2Fandroid-studio-testing-helloworld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraimonizard%2Fandroid-studio-testing-helloworld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraimonizard%2Fandroid-studio-testing-helloworld/lists"}