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 testCaseCountDeclared In
XCAbstractTest.h
name
@property name Test’s name. Must be overridden by subclasses.
@property (readonly, copy) NSString *nameDeclared 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 *testRunDeclared In
XCAbstractTest.h
– performTest:
@method -performTest: The method through which tests are executed. Must be overridden by subclasses.
- (void)performTest:(XCTestRun *)runDeclared In
XCAbstractTest.h
– runTest
@method -runTest Creates an instance of the testRunClass and passes it as a parameter to performTest:.
- (void)runTestDeclared In
XCAbstractTest.h
– setUp
@method -setUp Setup method called before the invocation of each test method in the class.
- (void)setUpDeclared In
XCAbstractTest.h
– tearDown
@method -tearDown Teardown method called after the invocation of each test method in the class.
- (void)tearDownDeclared In
XCAbstractTest.h