IOS單元測試
- 單元測試開始
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
} - 單元測試結(jié)束
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
} - 單元測試測試方法 所有的測試內(nèi)容都在這個方法里面執(zhí)行遭居。但是不一定是命名為testExample炮车,也可以是textProgram
- (void)testExample {} - 性能測試。耗時和性能消耗在這里測試
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
- 測試用例覆蓋測試的工具類里面所有的func
這個覆蓋率指的是代碼而不是函數(shù)。