Open sasasamaes opened 4 days ago
I'd be happy to do this.
Could I take a shot at this?
Gm, I've gone through the description and I can implement a test library to meet the accepted criteria.
To address this issue I would integrate Espresso and JUnit for unit and UI testing, with dependencies for JUnit, Kotlin Test, and Mockito already configured in build.gradle. Then implement a test under src/test/kotlin. Make sure this leads to having beautiful integration with CI/CD for seamless execution.
Hey! Can I take this issue?
Objective Integrate a robust testing library for Android.
Recommended Option: Espresso + JUnit Feel free to suggest another option
Dependencies (build.gradle) `dependencies { // JUnit testImplementation 'junit:junit:4.13.2'
// Kotlin Test testImplementation 'org.jetbrains.kotlin:kotlin-test-junit:1.8.20'
// Mockito testImplementation 'org.mockito:mockito-core:4.5.1'
// Android Testing androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' }`
Test Structure
Directory: src/test/kotlin Directory: src/androidTest/kotlin
Unit Test Example
class UserViewModelTest { @Test fun
test user login() { val viewModel = UserViewModel() viewModel.login("user", "password") assertTrue(viewModel.isLoggedIn) } }
Acceptance Criteria