android10 / android10/Android-CleanArchitecture

Q: How to test fragments

Aperta
#211 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
15.5k
Fork
3.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi Fernando,

I was checking your example of the Clean Architecture and some doubts crossed my mind in the testing phase. Checking your latest code I can see that you do not test the fragments. Is that on purpouse? Shouldn't there be tests for it?

Also I am having doubts on how to implement the tests of the fragments, regarding the injection of the presenters. For instance, when testing UserListFragment, how can you inject the presenter and assert that when a user is clicked, the presenter's onUserClicked is called?

Looking forward for your feedback.
Best regards,
Ricardo Brilhante

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia con UserListFragment e con il percorso di injection del presenter descritto nell’issue. Traccia l’interazione al clic su un utente e determina come può essere testata, incluso come verificare la chiamata onUserClicked del presenter. Il lavoro è completato quando è documentato un approccio chiaro per il testing di fragments e presenters.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, java
Ambito
mobile, testing
Tipo di issue
Documentazione
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.