IOS单元测试
- 单元测试开始
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
} - 单元测试结束
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
} - 单元测试测试方法 所有的测试内容都在这个方法里面执行。但是不一定是命名为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
这个覆盖率指的是代码而不是函数。
网友评论