2

I created a ui test class:

import Foundation
import XCTest
@testable import TestProject

@available(iOS 9.0, *)
class ChangeWishListUITests: XCTestCase {

    func testExample() {
        // Use recording to get started writing UI tests.
        // Use XCTAssert and related functions to verify your tests produce the correct results.


    }

}

Run app on iphone 6 simulator with ios 9.3: enter image description here

But, record button, like in this tutorial: https://developer.apple.com/library/ios/documentation/ToolsLanguages/Conceptual/Xcode_Overview/RecordingUITests.html#//apple_ref/doc/uid/TP40010215-CH75-SW1

didn't appear.

enter image description here

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Arti
  • 7,356
  • 12
  • 57
  • 122
  • 1
    sometimes you need to press cursor inside testExample() test case, also take a look at this http://stackoverflow.com/questions/31874855/xcode-7-ui-tests-recording-button-is-greyed-out – Eugene Gordin Apr 21 '16 at 19:50

3 Answers3

1
  1. your cursor has to be inside the method that you want to implement (because Xcode generates the code to the cursor position)

If this doesn't help:

  1. sometimes Xcode appears to be instable when you add a UI test to an existing project. The following sequence helped me in some cases:

    • clean the project
    • restart Xcode
    • rebuild the project
    • click inside the test method to set the cursor

Sometimes I had to do this two times.

  1. Your simulator has to run at least iOS 9.0
JosephH
  • 37,173
  • 19
  • 130
  • 154
Gerd Castan
  • 6,275
  • 3
  • 44
  • 89
1

In my case I had forgotten to add a UI Test target in the project and assign the test file to this target

0

the debug area is hidden...

toggle debug editor on keyboard by pressing "shift + command + y" simultaneously

sterling archer
  • 334
  • 3
  • 16