gpt4 book ai didi

xcode - XCTest- "Test failed"

转载 作者:行者123 更新时间:2023-12-03 16:04:35 27 4
gpt4 key购买 nike

我正在尝试向Mac应用添加测试。
我正在使用XCTest框架。
当我运行测试(cmd + U)时,我收到“测试失败”的消息,在控制台中,我看到了:

2013-10-15 13:22:56.354 8tracks Radio[40560:303] Error loading /Users/victor/Library/Developer/Xcode/DerivedData/Musica-dhxbqwburbddtietormguodcwoqt/Build/Products/Test/MusicaTests.octest/Contents/MacOS/MusicaTests:  dlopen(/Users/victor/Library/Developer/Xcode/DerivedData/Musica-dhxbqwburbddtietormguodcwoqt/Build/Products/Test/MusicaTests.octest/Contents/MacOS/MusicaTests, 262): no suitable image found.  Did find:
/Users/victor/Library/Developer/Xcode/DerivedData/Musica-dhxbqwburbddtietormguodcwoqt/Build/Products/Test/MusicaTests.octest/Contents/MacOS/MusicaTests: open() failed with errno=1IDEBundleInjection.c: Error loading bundle '/Users/victor/Library/Developer/Xcode/DerivedData/Musica-dhxbqwburbddtietormguodcwoqt/Build/Products/Test/MusicaTests.octest'

有任何想法吗?
干杯!

最佳答案

您需要禁用代码签名才能运行单元测试。 This page解释了如何创建测试配置,以便对调试和发布应用程序进行代码签名,但对单元测试不进行代码签名。更改配置后,请不要忘记进行彻底清理。

关于xcode - XCTest- "Test failed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19378922/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com