jeudi 23 mars 2017

Espresso Instrumentation run failed due to 'Process crashed.' RxCachedThreadScheduler-1

I'm using Espresso And RXjava 2.x , all the ui tests run correctly and successfully pass if I run it individually (one by one), but When I run whole class , I got

Test failed to run to completion. Reason: 'Instrumentation run failed due to 'Process crashed.''. Check device logcat for details Test running failed: Instrumentation run failed due to 'Process crashed.'

in logcat I got :

FATAL EXCEPTION: RxCachedThreadScheduler-1

java.lang.NullPointerException: onNext called with null. Null values are generally not allowed in 2.x operators and sources.

I spent alot of time but can't figure it out , but couldn't get what is the problem .

here is the code:

http://ift.tt/2mYfHbj

  • And I use RXAndroid Schedulers at

Observable<NewsModel> observableNewsModel = remoteRepository.getNews().subscribeOn(Schedulers.io());

What do I have to do to make Class itself run test correctly ?

Aucun commentaire:

Enregistrer un commentaire