本文介绍了什么是真正之间的设备和模拟器/仿真器的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

近日在QCon大会,杰拉德梅萨罗斯说,我们应该只在模拟器上运行的自动化测试,以提高效率。我们也正在考虑有关移动自动化测试。但我不知道是否会有一些问题,只能在真实设备发现的?还是喜欢拍照的一些组件,重力感应器不能在模拟器/仿真器测试?谢谢!

编辑:

您可以在这里找到Gerard的幻灯片:的.

我通过幻灯片阅读一次我发现我误会了他的观点。他真正的意思是,我们应该尽量避免在硬件(第41页)调试。他还提到,我们可以陷阱传出请求传感器和其他服务,再注入从他们的响应。也许我们可以挑选一些案件不能在模拟器进行全面的测试,然后与实际设备进行测试。

感谢您对您的所有意见! :)


解决方案

This was odd advice, if that is really what Mr. Meszaros said. Running tests on the emulator is fine, but "only" is an excessive recommendation. There is no harm in running automated tests on devices, and you can learn a lot from doing so.

Of course.

  • Many devices have multi-core CPUs, whereas the emulator only emulates a single core at this time
  • Device storage tends to run a lot slower than does storage on the emulator
  • Device manufacturers tinker with Android in ways that will not appear on an emulator running stock Android
  • The emulator only loosely emulates hardware related to power, Internet (e.g., no mobile data, no WiFi), GPS, sensors, camera, etc.
  • The emulator does not support some device capabilities, like the new V2 version of Maps, the Play Store, multiple accounts on Android 4.2, etc.

And so on.

Those ones are difficult to test in an automated fashion, period.

这篇关于什么是真正之间的设备和模拟器/仿真器的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 16:51