This is expected behavior.
onView(withId(R.id.gettingStarted))
by itself doesn't do anything. When you invoke the perform method, Espresso runs the matcher provided inside the onView method against the current view hierarchy - if no matching view is found, the exception is thrown.
See the start guide for more details: https://developer.android.com/training/testing/espresso/index.html