gpt4 book ai didi

iOS 单元测试 : how to handle completion of tests?

转载 作者:行者123 更新时间:2023-11-28 20:22:14 25 4
gpt4 key购买 nike

我想在控制台输出的末尾写入测试工件的路径。这会很方便。我也很好奇。

似乎 XCTest 以某种方式终止了应用程序,应用程序委托(delegate)没有收到生命周期回调,程序在 main.m 的主函数之前退出。

最佳答案

看看Test Execution and Observation具体testBundleDidFinish .

如果您定义了一个采用XCTestObservation 的对象,您可以在测试套件运行期间的任何时候将其添加到XCTestObservationCenter.shared 实例,并在整个过程中接收调用 bundle 已完成。

关于iOS 单元测试 : how to handle completion of tests?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46248659/

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