Title: Theory / Important / CS / Programming / Objective-C / test / XCTest / General
Tags: automatedNewLineAfterCommaSpace
On every note of this deck, unless a note says otherwise:
Language: Objective-C

Name: XCtest
Definition: the framework for UI testing capabilities, integrated with Xcode
Page: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/09-ui_testing.html

Question: Step for UI recording test
Answer: Using the test navigator, create an UI testing target.
Page: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/09-ui_testing.html
Context: Testing with Xcode
Answer2: In the template file that is created, place the cursor into the test function.
Start UI recording.
Answer3: The app launches and runs. Exercise the app doing a sequence of UI actions. Xcode captures the actions into source in the body of the function.
Answer4: When done with the actions you want to test, stop UI recording.
Answer5: Add XCTest assertions to the source.

Instruction: (void)testFoo {
  bar
}
Page: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/09-ui_testing.html
Meaning: during test, run bar
Language: Objective-C
Context: Xcode test
Identifier: testFoo

Instruction: @testable import foo
Page: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/09-ui_testing.html
Effect: All content of foo is public
Language: Objective-C
Context: Xcode test
Assuming: foo was compilled with the flag -enable-testing

Instruction: XCTAssert(Not)EqualObjects(
  actual,
  expected,
  format_string,
  format_args...
)
Page: https://developer.apple.com/documentation/xctest/xctassertnotequal?language=objc
Effect: if actual is not (is) equal to expected,  print(format_string, format_args...)
Language: Objective-C
Context: Xcode test
Assuming: actual and expected are objects

Instruction: XCTAssert(Not)Equal(
  actual,
  expected,
  format_string,
  format_args...
)
Page: https://developer.apple.com/documentation/xctest/xctassertnotequal?language=objc
Effect: if actual is not (is) equal to expected,  print(format_string, format_args...)
Language: Objective-C
Context: Xcode test
Assuming: actual and expected are c scalar type

Instruction: XCTAssert(Not)Identical(
  actual,
  expected,
  format_string,
  format_args...
)
Page: https://developer.apple.com/documentation/xctest/xctassertidentical?language=objc
Effect: if actual is not (is) the same instance as expected,  print(format_string, format_args...)
Language: Objective-C
Context: Xcode test
Assuming: actual and expected are objects

Instruction: XCTAssert(Not)EqualWithAcurracy(
  actual,
  expected,
  accuracy,
  format_string,
  format_args...
)
Page: https://developer.apple.com/documentation/xctest/xctassertidentical?language=objc
Effect: if |actual-expected| is greater than (less than or equal to) accuracy,  print(format_string, format_args...)
Language: Objective-C
Context: Xcode test
Assuming: actual and expected are scalar type

Variable: expectation.expectationDescription
Meaning: the description of this expectation
Page: https://developer.apple.com/documentation/xctest/xctestexpectation/2806571-initwithdescription?language=objc
Context: Xcode test
Variables: XCTestExpectation expectation

Variable: expectation.expectedFulfillmentCount
Meaning: The number of times fulfill must be called before the expectation is completely fulfilled.
Page: https://developer.apple.com/documentation/xctest/xctestexpectation/2806572-expectedfulfillmentcount?language=objc
Context: Xcode test
Variables: XCTestExpectation expectation
Initialization: 1

Variable: expectation.assertForOverFulfill
Meaning: a call to fulfill made after the expectation has already been fulfilled (exceeding expectedFulfillmentCount) will trigger an assertion
Page: https://developer.apple.com/documentation/xctest/xctestexpectation/2806575-assertforoverfulfill?language=objc
Context: Xcode test
Variables: XCTestExpectation expectation
Initialization: NO for XCTestExpectation. YES for some conveniance method

Variable: expectation.isInverted
Meaning: Test fail if the expectation is fulfilled
Page: https://developer.apple.com/documentation/xctest/xctestexpectation/2806575-assertforoverfulfill?language=objc
Context: Xcode test
Variables: XCTestExpectation expectation
Initialization: NO

Variable: kvoExpectation.keyPath
Meaning: The key path that is being observed for KVO changes.
Page: https://developer.apple.com/documentation/xctest/xctkvoexpectation/2806841-initwithkeypath?language=objc
Context: Xcode test
Variables: XCTKVOExpectation kvoExpectation

Variable: kvoExpectation.observedObject
Meaning: The object that is being observed for KVO changes.
Page: https://developer.apple.com/documentation/xctest/xctkvoexpectation/2806845-observedobject?language=objc
Context: Xcode test
Variables: XCTKVOExpectation kvoExpectation

Variable: kvoExpectation.expectedValue
Meaning: The value that the expectation is waiting for the observed key path to take.
Page: https://developer.apple.com/documentation/xctest/xctkvoexpectation/2806845-observedobject?language=objc
Context: Xcode test
Variables: XCTKVOExpectation kvoExpectation

Variable: kvoExpectation.NSKeyValueObservingOptions
Meaning: The NSKeyValueObservingOptions used when registering for observation
Page: https://developer.apple.com/documentation/xctest/xctkvoexpectation/2806845-observedobject?language=objc
Context: Xcode test
Variables: XCTKVOExpectation kvoExpectation

Variable: expectation.handler
Meaning: An optional handler that performs custom evaluation of changes to the observed key path.
Page: https://developer.apple.com/documentation/xctest/xctkvoexpectation/2806845-observedobject?language=objc
Context: Xcode test
Variables: (XCTKVOExpectation|XCTNotificationExpectation| XCTDarwinNotificationExpectation|XCTNSPredicateExpectation) expectation

Variable: notificationExpectation.notificationName
Meaning: The name of the notification that the expectation is waiting for.
Page: https://developer.apple.com/documentation/xctest/xctnsnotificationexpectation/2806829-notificationname?language=objc
Context: Xcode test
Variables: XCTNS(Notification|Darwin)Expectation notificationExpectation

Variable: notificationExpectation.observedObject
Meaning: The object by which the notification must be posted, or nil if the notification can be posted by any object.
Page: https://developer.apple.com/documentation/xctest/xctnsnotificationexpectation/2806829-notificationname?language=objc
Context: Xcode test
Variables: XCTNSNotificationExpectation notificationExpectation

Variable: notificationExpectation.notificationCenter
Meaning: The notification center from which the notification must be posted.
Page: https://developer.apple.com/documentation/xctest/xctnsnotificationexpectation/2806829-notificationname?language=objc
Context: Xcode test
Variables: XCTNSNotificationExpectation notificationExpectation

Variable: notificationExpectation.handler
Meaning: An optional handler that performs custom evaluation of matching notifications.
Page: https://developer.apple.com/documentation/xctest/xctnsnotificationexpectation/2806829-notificationname?language=objc
Context: Xcode test
Variables: XCTNSNotificationExpectation notificationExpectation

Variable: predicateExpectation.predicate
Meaning: the predicate evaluated by the expectation
Page: https://developer.apple.com/documentation/xctest/xctnspredicateexpectation?language=objc
Context: XCTNSPredicateExpectation predicateExpectation

Variable: predicateExpectation.object
Meaning: An optional object against which the predicate is evaluated
Page: https://developer.apple.com/documentation/xctest/xctnspredicateexpectation?language=objc
Context: XCTNSPredicateExpectation predicateExpectation

Variable: waiter.delegate
Meaning: The delegate to which expectation fulfillment events will be reported.
Page: https://developer.apple.com/documentation/xctest/xctwaiter?language=objc
Variables: XCTWaiter waiter

Variable: waiter.fulfilledExpectations
Meaning: An array of expectations that were fulfilled, in order, up until the waiter stopped waiting
Page: https://developer.apple.com/documentation/xctest/xctwaiter?language=objc
Variables: XCTWaiter waiter

Typ: XCTWaiterResult
TypMeaning: Result states returned by a waiter when it completes, times out, fails, or is interrupted.
Page: https://developer.apple.com/documentation/xctest/xctwaiter?language=objc
Language: Objective-C
Value: XCTWaiterResultCompleted
All of the waiter’s expectations were fulfilled successfully.
Value2: XCTWaiterResultTimedOut
The waiter timed out before all of its expectations were fulfilled.
Value3: XCTWaiterResultIncorrectOrder
The waiter’s expectations were not fulfilled in the required order.
Value4: XCTWaiterResultInvertedFulfillment
An inverted expectation was fulfilled.
Value5: XCTWaiterResultInterrupted
The waiter was interrupted prior to its expectations being fulfilled or timing out.

Variable: activity.name
Meaning: the name of the activity
Page: https://developer.apple.com/documentation/xctest/xctactivity/2887219-name?language=objc
Context: XCode test
Variables: XCTActivity activity

Variable: attachment.uniformTypeIdentifier
Meaning: identifies the type of content in the attachment
Page: https://developer.apple.com/documentation/xctest/xctactivity/2887219-name?language=objc
Context: XCode test
Variables: XCTAttachment attachment

Variable: attachment.lifetime
Meaning: When should the attachment be deleted
Page: https://developer.apple.com/documentation/xctest/xctactivity/2887219-name?language=objc
Context: XCode test
Typ: XCTAttachmentLifetime
Variables: XCTAttachment attachment
Initialization: XCTAttachmentLifetimeDeleteOnSuccess

Typ: XCTAttachmentLifetime
TypMeaning: The possible lifetime values for a test attachment.
Page: https://developer.apple.com/documentation/xctest/xctattachmentlifetime?language=objc
Language: Objective-C
Context: XCode test
Value: XCTAttachmentLifetimeDeleteOnSuccess
Indicates that the attachment should be deleted if the test passes.
Value2: XCTAttachmentLifetimeKeepAlways
Indicates that the attachment should be persisted as part of the test’s results even if the test passes.

Variable: attachment.name
Meaning: the name of the attachment
Page: https://developer.apple.com/documentation/xctest/xctattachment/2887211-name?language=objc
Context: XCode test
Variables: XCTAttachment attachment

Variable: attachment.userInfo
Meaning: User-provided metadata associated with the attachment.
Page: https://developer.apple.com/documentation/xctest/xctattachment/2887205-userinfo?language=objc
Context: XCode test
Variables: XCTAttachment attachment

Typ: XCTImageQuality
TypMeaning: Compression quality options for image-based attachments.
Page: https://developer.apple.com/documentation/xctest/xctimagequality?language=objc
Language: Objective-C
Context: XCode test
Value: XCTImageQualityOriginal
Original image quality, represented as a lossless PNG image.
Value2: XCTImageQualityMedium
Medium image quality, represented as a high quality lossy JPEG image.
Value3: XCTImageQualityLow
Low image quality, represented as a highly compressed lossy JPEG image.

Instruction: [XCTAttachment
  attachmentWithPlistObject:object
]
Page: https://developer.apple.com/documentation/xctest/xctattachment/2887214-attachmentwithplistobject?language=objc
Language: Objective-C
Context: XCode test
Returns: Creates an attachment from object
Assuming: object can be represented in an XML property list.

Instruction: [XCTAttachment
  attachmentWithArchivableObject:object
]
Page: https://developer.apple.com/documentation/xctest/xctattachment/2887214-attachmentwithplistobject?language=objc
Language: Objective-C
Context: XCode test
Returns: Creates an attachment with object, of type public.data
Assuming: object conforms to NSSecureCoding

Instruction: [XCTAttachment
  attachmentWithArchivableObject:object
  uniformTypeIdentifier:identifier
]
Page: https://developer.apple.com/documentation/xctest/xctattachment/2887214-attachmentwithplistobject?language=objc
Language: Objective-C
Context: XCode test
Returns: Creates an attachment with object, of type identifier
Assuming: object conforms to NSSecureCoding

Variable: issue.type
Meaning: A value for classifying an issue that occurs during testing.
Page: https://developer.apple.com/documentation/xctest/xctissue/3546513-type?language=objc
Context: XCode test
Variables: XCTIssue issue

Variable: issue.compactDescription
Meaning: A concise description of the issue with no transient data, suitable for use in test run summaries and results aggregation across multiple test runs.
Page: https://developer.apple.com/documentation/xctest/xctissue/3546508-compactdescription?language=objc
Context: XCode test
Variables: XCTIssue issue

Variable: issue.detailedDescription
Meaning: A detailed description of the issue that may include transient data, such as numbers, object identifiers, and timestamps, to help diagnose the issue.
Page: https://developer.apple.com/documentation/xctest/xctissue/3546509-detaileddescription?language=objc
Context: XCode test
Variables: XCTIssue issue

Variable: issue.sourceCodeContext
Meaning: The source code location for the issue, including the filename, line number, and call stack.
Page: https://developer.apple.com/documentation/xctest/xctissue/3546509-detaileddescription?language=objc
Context: XCode test
Typ: XCTSourceCodeContext
Variables: XCTIssue issue

Variable: issue.associatedError
Meaning: An optional error to associate with a test issue.
Page: https://developer.apple.com/documentation/xctest/xctissue/3546509-detaileddescription?language=objc
Context: XCode test
Typ: NSError
Variables: XCTIssue issue

Variable: issue.attachments
Meaning: An array of data that augments a test issue
Page: https://developer.apple.com/documentation/xctest/xctissue/3546509-detaileddescription?language=objc
Context: XCode test
Typ: NSArray<XCTAttchment *>
Variables: XCTIssue issue

Variable: sourceCodeContext.callStack
Meaning: An array of source code frames that describes the call stack when a test issue occurs.
Page: https://developer.apple.com/documentation/xctest/xctmutableissue/3546526-type?language=objc
Typ: NSArray<XCTSourceCodeFrame *>
Variables: XCTSourceCodeContext sourceCodeContext

Variable: frame.address
Meaning: An address that represents a specific frame in a call stack.
Page: https://developer.apple.com/documentation/xctest/xctsourcecodeframe?language=objc
Variables: XCTSourceCodeFrame frame

Variable: frame.symbolInfo
Meaning: Symbolication information for the referenced frame.
Page: https://developer.apple.com/documentation/xctest/xctsourcecodeframe?language=objc
Typ: XCTSourceCodeSymbolInfo
Variables: XCTSourceCodeFrame frame

Variable: frame.symbolicationError
Meaning: An optional error that describes a failed symbolication attempt.
Page: https://developer.apple.com/documentation/xctest/xctsourcecodeframe/3546538-symbolicationerror?language=objc
Typ: NSError
Variables: XCTSourceCodeFrame frame

Variable: sourceCode.location
Meaning: A representation of a location in source code where a test issue occurred.
Page: https://developer.apple.com/documentation/xctest/xctsourcecodecontext/3546533-location?language=objc
https://developer.apple.com/documentation/xctest/xctsourcecodesymbolinfo?language=objc
Variables: XCTSourceCodeContext context
XCTSourceCodeSymbolInfo context

Variable: codeLocation.fileURL
Meaning: A file URL that represents the file-system location of the source code file.
Page: https://developer.apple.com/documentation/xctest/xctsourcecodelocation/3546540-fileurl?language=objc
Variables: XCTSourceCodeLocation codeLocation

Variable: codeLocation.lineNumber
Meaning: An integer that represents a line of code in a source code file.
Page: https://developer.apple.com/documentation/xctest/xctsourcecodelocation/3546543-linenumber?language=objc
Variables: XCTSourceCodeLocation codeLocation

Variable: testSuiteRun.testRuns
Meaning: An array of test runs that the test suite manages.
Page: https://developer.apple.com/documentation/xctest/xctestsuiterun/1426489-addtestrun?language=objc
Variables: XCTestSuiteRun *testSuiteRun;

Name: An expected failure
Definition: A failure in explicit test assertion
Page: https://developer.apple.com/documentation/xctest/xctestrun?language=objc
Typ: XCTestRun

Name: An unexpected failure
Definition: A failure from unrelated or uncaught exceptions
Page: https://developer.apple.com/documentation/xctest/xctestrun?language=objc

Instruction: [testRun
  start
]
Page: https://developer.apple.com/documentation/xctest/xctestrun/1449649-start?language=objc
Effect: start the test run
Language: Objective-C
Variables: XCTestRun testRun
Assuming: called at most once

Instruction: [testRun
  stop
]
Page: https://developer.apple.com/documentation/xctest/xctestrun/1449649-start?language=objc
Effect: stop the test run
Language: Objective-C
Variables: XCTestRun testRun
Assuming: called at most once, and only if run started

Instruction: [testRun recordIssue:issue]
Page: https://developer.apple.com/documentation/xctest/xctestrun/3546553-recordissue?language=objc
Effect: Records an issue during test execution for the test run.
Language: Objective-C
Variables: XCTestRun testRun
XCTIssue issue
Assuming: call super unless you want to suppress the issue.

Variable: testRun.startDate
Meaning: date and time when the run started. Or no value if the test hasn't run
Page: https://developer.apple.com/documentation/xctest/xctestrun/3546553-recordissue?language=objc
Variables: XCTestRun testRun

Variable: testRun.stopDate
Meaning: The date and time when the test run stopped, or no value if the test hasn’t run.
Page: https://developer.apple.com/documentation/xctest/xctestrun/3546553-recordissue?language=objc
Variables: XCTestRun testRun

Variable: testRun.testDuration / testRun.totalDuration
Meaning: The number of seconds that elapse between when the run starts and when it stops.
Page: https://developer.apple.com/documentation/xctest/xctestrun/1449635-testduration?language=objc
Variables: XCTestRun testRun

Variable: testRun.hasSucceeded
Meaning: A Boolean value that returns true if all tests in the run completed without recording any failures; otherwise, false.
Page: https://developer.apple.com/documentation/xctest/xctestrun/1449631-hassucceeded?language=objc
Variables: XCTestRun testRun

Variable: testRun.hasBeenSkipped
Meaning: A Boolean value that indicates a skipped test.
Page: https://developer.apple.com/documentation/xctest/xctestrun/3521152-hasbeenskipped?language=objc
Variables: XCTestRun testRun

Variable: testRun.executionCount
Meaning: The number of test executions during the run.
Page: https://developer.apple.com/documentation/xctest/xctestrun/1449644-executioncount?language=objc
Variables: XCTestRun testRun

Variable: testRun.failureCount
Meaning: The number of test failures during the run
Page: https://developer.apple.com/documentation/xctest/xctestrun/1449629-failurecount?language=objc
Variables: XCTestRun testRun

Variable: testRun.skipCount
Meaning: The number of skipped tests during the run
Page: https://developer.apple.com/documentation/xctest/xctestrun/3521153-skipcount?language=objc
Variables: XCTestRun testRun

Variable: testRun.test
Meaning: the test instance for the test run
Page: https://developer.apple.com/documentation/xctest/xctestrun/3521153-skipcount?language=objc
Typ: XCTest
Variables: XCTestRun testRun

Variable: testRun.testCaseCount
Meaning: The number of tests in the run
Page: https://developer.apple.com/documentation/xctest/xctestrun/3521153-skipcount?language=objc
Variables: XCTestRun testRun

Variable: testRun.totalFailureCount
Meaning: The number of test failures and uncaught exceptions during the run.
Page: https://developer.apple.com/documentation/xctest/xctestrun/3521153-skipcount?language=objc
Variables: XCTestRun testRun

Variable: testRun.unexpectedExceptionCount
Meaning: The number of uncaught exceptions during the run.
Page: https://developer.apple.com/documentation/xctest/xctestrun/1449634-unexpectedexceptioncount?language=objc
Variables: XCTestRun testRun

Typ: XCTestSuite
Meaning: A collection of test cases to manage as a test suite.
Page: https://developer.apple.com/documentation/xctest/xctestsuite?language=objc
Language: Objective-C
Subtype of: XCTest
Intuition: Typically, Xcode automatically manages test suites for you. Only use XCTestSuite if you need to define your own custom test suites programmatically.

Variable: XCTestSuite.defaultTestSuite
Meaning: the default test suite
Page: https://developer.apple.com/documentation/xctest/xctestsuite?language=objc

Page: https://developer.apple.com/documentation/xctest/xctestsuite/1500818-testsuitefortestcaseclass?language=objc
Variables: XCTestSuite *testSuite
Initialization: testSuite.tests
Value: All tests currently in the test suite.

Variable: test.name
Meaning: the name of the test.
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Context: XCode test
Variables: XCTest test
Assuming: Must be overriden by subclasses

Variable: test.testCaseCount
Meaning: the name of test cases in the test.
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Context: XCode test
Variables: XCTest test
Assuming: Must be overriden by subclasses

Variable: test.testRun
Meaning: An instance of testRunClass, or nil if the test hasn’t run.
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Context: XCode test
Typ: XCTestRun
Variables: XCTest test

Instruction: [test
  setUpWithError:error
]
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Effect: Provides an opportunity to reset state before calling each test method in a test case.
Language: Objective-C
Context: XCode test
Variables: XCTest test
Intuition: Override this method to reset state for each test method.

Instruction: [test
  tearDownWithCompletionHandler:completion
]
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Effect: Provides an opportunity to perform cleanup asynchronously and handle errors after each test method in a test case ends.
Language: Objective-C
Context: XCode test
Variables: XCTest test
Intuition: Override this method for asynchronous state cleanup with error handling after each test. Call the completion handler after you have cleaned up your state to notify the test system it can proceed with the next task.

Question: Before each test beging, XCTest calls
Answer: This method for asynchronous state preparation and error handling,
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Variables: XCTest test
Answer2: setUpWithError: for synchronous state preparation and error handling,
Answer3: Then setUp for synchronous state preparation without error handling.

Question: After each test ends, XCTest calls
Answer: tearDown
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Variables: XCTest test
Answer2: tearDownWithError()
Answer3: tearDownWithCompletionHandler

Instruction: [test
  tearDownWithError:error
]
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Effect: Provides an opportunity to perform cleanup and to throw errors after each test method in a test case ends.
Language: Objective-C
Variables: XCTest test
Intuition: If state cleanup might throw errors, override this method or tearDownWithCompletionHandler:.

Instruction: [test performTest:run]
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Effect: Executes a specific test.
Language: Objective-C
Variables: XCTest *test
XCTestRun *run
Assuming: Must be overridden by subclasses.

Instruction: [test runTest]
Page: https://developer.apple.com/documentation/xctest/xctest?language=objc
Language: Objective-C
Returns: Creates an instance of the class that testRunClass specifies, and passes it as a parameter to the performTest: method.
Variables: XCTest *test
XCTestRun *run
Assuming: Must be overridden by subclasses.

Question: To add tests to your project:
Answer: Create a new subclass of XCTestCase within a test target.
Page: https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods?language=objc
Context: xcode
Answer2: Add one or more test methods to the test case.
Answer3: Add one or more test assertions to each test method.

Name: A test method
Definition: an instance method on an XCTestCase subclass, with no parameters, no return value, and a name that begins with the lowercase word test.
Page: https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods?language=objc
Context: xcode

Page: https://developer.apple.com/documentation/xctest/xctsourcecodesymbolinfo?language=objc
Context: xcode
Variables: XCTSourceCodeSymbolInfo sourceCodeSymbolInfo
Initialization: sourceCodeSymbolInfo.imageName
Value: The name of the binary image that contains the symbolicated code.

Variable: sourceCodeSymbolInfo.symbolName
Meaning: A string that represents a human-readable symbol in source code
Page: https://developer.apple.com/documentation/xctest/xctsourcecodesymbolinfo?language=objc
Context: xcode
Variables: XCTSourceCodeSymbolInfo sourceCodeSymbolInfo

Variable: expectedFailure.issue
Meaning: The issue that fulfills the expected failure.
Page: https://developer.apple.com/documentation/xctest/xctexpectedfailure?language=objc
Context: xcode
Typ: XCTIssue *
Variables: XCTExpectedFailure expectedFailure

Variable: expectedFailure.failureReason
Meaning: An optional string that describes why the test expects a failure.
Page: https://developer.apple.com/documentation/xctest/xctexpectedfailure?language=objc
Context: xcode
Variables: XCTExpectedFailure *expectedFailure

Variable: expectedFailureOptions.issueMatcher
Meaning: A block of code that determines whether the test issue fulfills the expected failure.
Page: https://developer.apple.com/documentation/xctest/xctexpectedfailureoptions?language=objc
Context: xcode
Variables: XCTExpectedFailureOptions expectedFailureOptions

Variable: expectedFailureOptions.enabled
Meaning: whether the test checks for the expected failure.
Page: https://developer.apple.com/documentation/xctest/xctexpectedfailureoptions?language=objc
Context: xcode
Variables: XCTExpectedFailureOptions expectedFailureOptions

Variable: expectedFailureOptions.strict
Meaning: whether the test reports an error if the expected failure doesn’t occur.
Page: https://developer.apple.com/documentation/xctest/xctexpectedfailureoptions?language=objc
Context: xcode
Variables: XCTExpectedFailureOptions expectedFailureOptions

Name: XCT prefix
Definition: Prefix of XCode Tests
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C

Typ: XCPredicateExpectationHandler
Meaning: A handler to be called when evaluating the predicate returns YES.
Page: https://developer.apple.com/documentation/xctest/xcpredicateexpectationhandler
Language: Objective-C