UI tests with Realm objects

I watched a few of the Realm swift meetup presentations with Jason Flax and he says that because SwiftUI and Realm are data-driven you should be doing UI tests. Does anyone know of a good example of how to actually do that? I can do unit tests with my Realm objects just fine, but I can’t really test the UI of my app if I can’t instantiate any test data (my understanding is you can’t do @testable import in UI tests).