xcode ui testing Recoding fails to generate code

361 views Asked by At

I created a new iOS SwiftUI app and added following ContenView

struct ContentView: View {
    var body: some View {
        VStack {
            Text("Hello, world!")
                .padding()
            Button("Press Me", action: {
                return print("button pressed")
            })
        }
    }
}

I tried to add an UI Test, where I check if the button is pressed.

What ever I do, after I press the recording button in the test no code is generated within the test function.

Every example have no issue at this point.

The record button is not greyed out an working.

Any Ideas what I have missed?

2

There are 2 answers

0
Wasim On BEST ANSWER

Fixed in Xcode 12.5.1, code generation works again ;)

enter image description here

0
Alex Baranov On

UI test recording is not working in Xcode 12.5, try to install 12.4. it still works there.