Getting started on Testing when using CoreData and CloudKit

I'm restarting my app using CoreData and CloudKit and want to implement testing before I get too far and it becomes unmanageable. Is there a good tutorial anyone has found for testing when using SwiftUI (macOS and iOS but not storyboards).

Thanks. It seems overwhelming right now and I don't know where to start. :)