XCTest Class Reference

Inherits from NSObject
Declared in XCAbstractTest.h

Overview

@class XCTest

An abstract base class for testing. XCTestCase and XCTestSuite extend XCTest to provide for creating, managing, and executing tests. Most developers will not need to subclass XCTest directly.

  testCaseCount

@property testCaseCount Number of test cases. Must be overridden by subclasses.

@property (readonly) NSUInteger testCaseCount

Declared In

XCAbstractTest.h

  name

@property name Test’s name. Must be overridden by subclasses.

@property (readonly, copy) NSString *name

Declared In

XCAbstractTest.h

  testRunClass

@property testRunClass The XCTestRun subclass that will be instantiated when the test is run to hold the test’s results. Must be overridden by subclasses.

@property (readonly) Class testRunClass

Declared In

XCAbstractTest.h

  testRun

@property testRun The test run object that executed the test, an instance of testRunClass. If the test has not yet been run, this will be nil.

@property (readonly, nullable) XCTestRun *testRun

Declared In

XCAbstractTest.h

– performTest:

@method -performTest: The method through which tests are executed. Must be overridden by subclasses.

- (void)performTest:(XCTestRun *)run

Declared In

XCAbstractTest.h

– run

@method -run Deprecated: use runTest instead.

- (XCTestRun *)run

Declared In

XCAbstractTest.h

– runTest

@method -runTest Creates an instance of the testRunClass and passes it as a parameter to performTest:.

- (void)runTest

Declared In

XCAbstractTest.h

– setUp

@method -setUp Setup method called before the invocation of each test method in the class.

- (void)setUp

Declared In

XCAbstractTest.h

– tearDown

@method -tearDown Teardown method called after the invocation of each test method in the class.

- (void)tearDown

Declared In

XCAbstractTest.h