1

I want to write a unit test for my app. For login or signup pages, it's easy to write tests for validation, error messages etc.

The issue is that I want to write a unit test for a splash screen. (Which is show random logo for 5 seconds and redirect the user to login page)

My question is: What is the test cases or scenarios I should write for this kind of screen?

I found a question which is close to what I want, but with Robolectric. (I don't want Robolectric)

Thanks

Community
  • 1
  • 1
Antwan
  • 3,837
  • 9
  • 41
  • 62
  • Have you tried running a timer in a single test method? The only thing is you have not to mix this test with the other ones. – Mohsen Mirhoseini Oct 10 '16 at 17:33
  • Actually i didn't tried yet, but what in my mind is to test that the next screen is launched after five second but idk how to implement it – Antwan Oct 10 '16 at 17:38
  • What u mean is to test that start activity line called after 5 seconds? – Antwan Oct 10 '16 at 17:47
  • I just edited your post to make it more clear. Check it over to make sure it still says what you want it to :) – Cullub Oct 10 '16 at 17:50
  • 1
    Thanks @cullub some times when u are in rush u just focus on what u want to do :) – Antwan Oct 10 '16 at 17:51

0 Answers0