Crypto-Jaguars / Revolutionary_Farmers

Proyecto hackaton Pura Vida 2024
https://revolutionary-farmers.vercel.app
MIT License
4 stars 21 forks source link

Implement a test library in Android #26

Open sasasamaes opened 4 days ago

sasasamaes commented 4 days ago

Objective Integrate a robust testing library for Android.

Recommended Option: Espresso + JUnit Feel free to suggest another option

  1. 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 funtest user login() { val viewModel = UserViewModel() viewModel.login("user", "password") assertTrue(viewModel.isLoggedIn) } }

Acceptance Criteria

Supa-mega commented 3 days ago

I'd be happy to do this.

mimisavage commented 3 days ago

Could I take a shot at this?

ooochoche commented 3 days ago

Gm, I've gone through the description and I can implement a test library to meet the accepted criteria.

aniruddhaaps commented 3 days ago

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.

evgongora commented 3 days ago

Hey! Can I take this issue?