小编Nbf*_*our的帖子

在 iOS 测试中以编程方式模拟 GPS 位置

我想在 Swift 中编写 UI 测试来制作我们应用程序中地图各个位置的屏幕截图。为了做到这一点,我需要在测试过程中模拟虚假的 GPS 数据。

有一些像这样的解决方案(https://blackpixel.com/writing/2016/05/simulating-locations-with-xcode-revisited.html)使用 GPX 文件并Debug > Simulate Location在 Xcode 中模拟位置,但我需要这个完全自动化。Ideal 将类似于LocationManagerAndroid 中的东西。

gps automated-tests ios xctest swift

5
推荐指数
1
解决办法
3153
查看次数

标签 统计

automated-tests ×1

gps ×1

ios ×1

swift ×1

xctest ×1