How to run UI Tests with project only using Package.swift

The title is my question. I want to run a UI test, as simple as this:

final class DatadogUITests: XCTestCase {
    func testDragon() async throws {
        let app = XCUIApplication()
        app.launch()

        // Check if the window with the "Dragon" text exists
        let dragonText = app.staticTexts["Dragon"]
        XCTAssertTrue(dragonText.exists, "The window with the 'Dragon' text does not exist.")
    }
}

However I get error: " 'NSInternalInconsistencyException', reason: 'No target application path specified via test configuration"

After googling, I found that I need to create some specific UITest target, however in Package.swift only testTarget is available, and that does not seem to work. This is my Package.Swift file:

// swift-tools-version:5.5

import PackageDescription

let package = Package(
    name: "App",
    platforms: [
        .iOS(.v15),
    ],
    products: [
        .library(name: "App", targets: ["App"]),
    ],
    dependencies: [
        .package(url: "https://github.com/Datadog/dd-sdk-ios.git", from: "1.11.1"),
    ],
    targets: [
        .target(
            name: "App",
            dependencies: [
                .product(name: "DatadogCrashReporting",
                         package: "dd-sdk-ios")
            ],
            path: "Sources"
        ),
        .testTarget(
            name: "AppTests",
            dependencies: ["App"],
            path: "Tests"
        ),
    ]
)