Best practices for conducting Unit/UI Testing on Safari App Extensions?

Hi,

I have a Safari App Extension that I would like to create unit and UI tests for. I am not new to Swift or development, but admittedly I do not have a lot of experience writing tests. My app extension is in the Mac App Store, so I figured it's the prime candidate for learning.

Unfortunately I'm running into issues, namely that the extension doesn't have a host application (or so Xcode thinks), and so the UI tests fail to run:

Code Block language
Cannot test target “TweaksForRedditUITests” on “My Mac”: UITargetAppPath should be provided

If I go to the project browser and click on the UI test target, the target application is set to TweaksForReddit, which seems like it's correct. The other targets include TweaksForRedditExtension, TweaksForRedditUnitTests, and TweaksForRedditUITests.

I could probably "fudge" it and add a button to the main app's interface that opens the extension's popover view in a window for testing, but I'm mostly wondering if that's necessary.

Thanks!