我有一个使用XCTestCase创建的默认单元测试目标的iOS项目。它称为gstreampTests。单元测试运行良好。
然后,我向gstreampTests添加了一个UI测试用例。测试开始失败,并显示以下错误消息:
“将单元测试包错误复制到应用程序gstreamp的容器路径/ private / var / mobile / Containers / Data / Application / 617998A4-EEF4-433B-97C1-DE6AA8F90196”
单元测试
#import <XCTest/XCTest.h>
@interface gstreampTests : XCTestCase
@end
@implementation gstreampTests
- (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];
}
- (void)testExample {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
NSInteger action1 = 20;
NSInteger action2 = 20;
XCTAssertEqual(action1, action2, "Action1 is not equal to Action2!");
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
@end
我已经删除了单元测试目标并添加了一个新目标。这没有解决问题。
感谢您的帮助。
谢谢, 克里斯