I\'ve installed Xcode 10 and upgraded my iOS application to Swift 4.2. When I run my tests (both UI and Unit) via Xcode, on an iPhone simulator running iOS 12, the tests success
In the Project Navigator, select the project file.
Select the Target in the Project configuration window.
Select Build Settings tab, (Basic and Levels)
Scroll down to iOS Deployment Target and then select the desired OS version.