XCTestCase performance measurement has no results on M1

I want to test app launch performance in my project. Therefore I tried to use performance test with measure func and XCTApplicationLaunchMetric. But after test completion there is no any result with average time. Here is a test example:

func testLaunchPerformance() throws {
        if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
            // This measures how long it takes to launch your application.
            measure(metrics: [XCTApplicationLaunchMetric()]) {
                XCUIApplication().launch()
            }
        }
    }

But when I create a new empty project and add the same performance test – it works and shows app launch results.

1st image is a real project test – there is no test result.

and the 2nd image is a demo empty project test – it has performance result diagram.

I am running test on MacBook with M1 Pro chip. However, when my colleague is running the same performance test on our real project with Intel based MacBook Pro – all is fine, it shows app launch results correctly as my demo project.

I have no idea how it can be fixed, because it seems that it depends on M1 chip 🤷🏻‍♂️.

May be somebody have a solution?

Hi, have you found the solution for this?

XCTestCase performance measurement has no results on M1
 
 
Q