无法运行KIF iOS自动化测试

时间:2014-05-12 01:31:56

标签: ios kif

刚刚将KIF集成到我的项目中 - 但是我无法让测试运行...

当我运行单元测试时,示例XCTest示例运行正常,但单独的kif测试永远不会执行。此外,它们出现在测试导航器中,但当我明确告诉他们执行时,他们很简单就不会。

我的KIF测试看起来像这样:

- (void)beforeEach
{
    NSLog(@"starting");
}

- (void)afterEach
{
    NSLog(@"ending");
}

- (void)testSuccessfulLogin
{
    [tester enterText:@"user@example.com" intoViewWithAccessibilityLabel:@"Login User Name"];
    [tester enterText:@"thisismypassword" intoViewWithAccessibilityLabel:@"Login Password"];
    [tester tapViewWithAccessibilityLabel:@"Log In"];
    [tester waitForTappableViewWithAccessibilityLabel:@"Welcome"];
}

和子类KIFTestCase

我很乐意提供更多信息,但我不确定还有什么可说的......有没有人有运行KIF测试的经验?

谢谢!

1 个答案:

答案 0 :(得分:0)

对于迟到的回答感到抱歉,但我实际上是在查看v1 cocoapod(前XCTest)。那就行了!!

当我切换时,一切正常。请务必在您的pod文件中执行此操作:

target 'Acceptance Tests', :exclusive => true do
    pod 'KIF', '~> 3.0'
相关问题