UI testing with XCUITest runs outside your app, so it does not affect your app's frame rate or battery during normal use.
However, running many UI tests can consume CPU and memory on your Mac or device during testing sessions.
Tests should be efficient to avoid long test times that slow development.