XCTest: App is terminated after changing device language

My UI test scenario is simple. Change device language in settings app and open my test app to check if the language in app is changed accordingly. And I would check about 5 languages so that involve switching between test app and settings app.

The problem is that when I applied the language change in device settings, the test is stopped. It shows "Message from debugger: Terminated due to signal 9" in console, I think that means my app was terminated by some cause.

So is that a correct behavior? If it is, how could I check test app's language after changing the device language?

Here is an example about the test case:

    func testExample() throws {
        // 1. lauch settingsApp
        let settingsApp = XCUIApplication(bundleIdentifier: "com.apple.Preferences")
        settingsApp.launch()
        
        // 2. change device language in settingsAPP and apply the change
        // MARK: App was terminated: Message from debugger: Terminated due to signal 9
        
        // 3. launch my app to check if language was changed accordingly
        let app = XCUIApplication()
        app.launch()
    }

And system failures in XCTestResult. enter image description here

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum