0

刚刚完成将 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 测试的经验吗?

谢谢!

4

1 回答 1

0

很抱歉回答迟了,但我实际上是在检查 v1 cocoapod(XCTest 前)。这样就行了!!

当我切换一切正常。确保在您的 pod 文件中执行此操作:

target 'Acceptance Tests', :exclusive => true do
    pod 'KIF', '~> 3.0'
于 2014-05-23T18:09:53.907 回答