iOS Tests

1. 创建项目,带着test;或者后期添加target

2. 继承XCTestCase,实现setUp,tearDown,testExample...

3. 异步处理,尤其是网络请求

1)

 [self waitForExpectationsWithTimeout:15.0 handler:nil];

2) 

XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];

[expectationfulfill];

4. 修改scheme (test)

你可能感兴趣的:(iOS Tests)