Se volete effettuare un test per la UI (che vi potrebbe servire ad esempio con fastlane), dovrete aggiungere un Target nel vostro progetto e potrete farlo come nello screenshot qui sotto, aggiungendo UI Testing Bundle:

Scegliete un nome coerente e cliccate su Finish:

Dato che probabilmente Xcode non vi avrà aggiungo lo Scheme, aggiungetelo voi:

Cliccate poi sul Target del test e poi su Ok per confermare!

Ora assicuratevi che abbia la spunta Run nelle impostazioni:

E ora potete cliccare sulla funzione (dovrebbe esservi spuntato un piccolo rombo a lato):
func testExample() {
// UI tests must launch the application that they test.
let app = XCUIApplication()
app.launch()
}
E cliccare sul tasto registra in basso a sinistra per registrare il vostro test da eseguire!