Photo by monicore from Pexels

Stepping into Activity tests with ActivityScenarios

Introducing the scenario

Component code

  • it loads the token, saved in the SharedPreferences for convenience;
  • if such token is not available, it will forward the users to the login screen;
  • if it is instead available, it will open the home screen of the app.

Writing a test case

Why should we use it?

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store