iOS Tests

2020-06-18  本文已影响0人  流年易逝_李

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)

上一篇 下一篇

猜你喜欢

热点阅读