在iOS中测试单元测试中的异步调用 [英] Testing asynchronous call in unit test in iOS

查看:139
本文介绍了在iOS中测试单元测试中的异步调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iOS中单元测试异步调用时遇到问题。 (虽然它在视图控制器中工作正常。)

I am facing a problem while unit testing an asynchronous call in iOS. (Although it is working fine in view controllers.)

之前是否有人遇到此问题?我尝试过使用等待功能,但我仍然遇到同样的问题。

Has anyone faced this issue before? I have tried using a wait function but I'm still facing the same problem.

请提供一个好办法的例子。

Please suggest an example of a good way to do this.

推荐答案

尝试KIWI框架。它功能强大,可以帮助您进行其他类型的测试。

Try KIWI framework. It's powerful and might help you with other kinds of tests.

这篇关于在iOS中测试单元测试中的异步调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆