Solving the IoT Mobile App Testing Conundrum with IoT Device Simulators

2023-03-01 12:23:10
关注

Solving the IoT Mobile App Testing Conundrum with IoT Device Simulators
Illustration: © IoT For All

Releasing a successful IoT product depends in part on ensuring that the device itself delivers the user experience that your customers expect. But it also depends in many cases on testing the IoT mobile apps that customers use to control IoT devices. Many consumer-grade IoT products – such as smart thermostats, internet-connected doorbells, and exercise equipment – rely on mobile apps running on users’ phones to provide management interfaces and deliver data to customers. If your IoT mobile app doesn’t work properly, your IoT device itself won’t work well for your users, either.

That’s why finding ways to test the unique interactions between IoT mobile apps and the devices they interact with is an imperative component of the software testing strategy of any business that provides IoT devices. Keep reading for tips on what to consider when addressing this challenge, along with an overview of what an effective IoT mobile app testing strategy typically looks like.

“…finding ways to test the unique interactions between IoT mobile apps and the devices they interact with is an imperative component of the software testing strategy of any business…”

-Frank Moyer

Testing Requirements for IoT Mobile Apps

In certain respects, mobile apps that interface with IoT devices present unique testing challenges. To test the apps reliably, you need to simulate the real-world conditions under which the app operates. That can be tricky to do because most IoT apps rely on Bluetooth networks to connect to devices, and most test automation tools are not designed with this type of configuration in mind.

Other challenges include the fact that IoT mobile apps may use a wide variety of protocols, which translates to more variables that test engineers need to factor in when planning tests. On top of that, the way mobile apps receive data from IoT devices can vary. Some IoT devices stream data to mobile apps continuously and in real-time, for instance, while others issue periodic push updates or are connected only intermittently.

How Not to Test Mobile Apps

Given the unique challenges described above, it may be tempting to settle for an IoT mobile app testing strategy that relies on manual tests to evaluate how well apps interface with the devices they manage. You could send out your engineers with phones in hand to perform the actual activity – like pedaling an IoT bike or ringing a smart doorbell – and evaluate how the mobile app responds.

But that approach is suboptimal. Beyond the obvious fact that it takes a lot of time to test devices manually (and that you’d have to repeat the laborious manual testing process every time you update the app), a manual approach to IoT mobile app testing makes it hard to test across a wide range of devices because you can’t take advantage of device farms. Instead, you’re limited to whichever handful of devices your engineers have at their disposal, which likely represent only a small subset of the devices that your customers may use. That leads to incomplete test coverage and increases the risk of app performance or reliability problems going undetected until they affect end users.

A Better Approach

Fortunately, there is a better way. You can connect your mobile device farm to physical IoT device simulators, then run automated tests that cover a wide range of scenarios and that reliably emulate real-world conditions.

An IoT device simulator is a special device that connects to mobile apps and sends them the same data that a real IoT device would send – except the simulator gives engineers control over exactly which data is sent. That means testing teams can configure simulators to represent the full range of user actions they want to test for, then push that data to IoT mobile apps using the same protocols and connection methods as customers would use.

In other words, if you want to test how a mobile app responds when a user pedals a smart bike uphill or brakes suddenly, you can configure your IoT simulator to send data to the device that simulates those actions. Or, you could test how an app that controls a smart thermostat responds to a sudden drop in ambient temperature, or how a mobile app handles an IoT doorbell that a user presses repeatedly for a prolonged period. In addition to making it possible to perform these tests automatically across a wide range of devices, this approach allows engineers to take advantage of cloud-based testing software. As long as your mobile devices integrate with your testing cloud, you can test interactions between mobile apps and IoT devices over local connections even if your testing software is not hosted locally.

The Future of IoT Mobile App Testing

The type of IoT mobile app testing strategy I’ve described here is critical to ensuring that IoT devices and the apps they depend on meet user expectations, even as IoT devices continue to grow in scale and complexity. Manual IoT testing may have worked when consumer IoT devices were newer and customers expected less, but to test effectively in today’s high-stakes IoT world, you need the type of automation, broad coverage, and cloud-friendly testing that only IoT device simulators can provide.

Tweet

Share

Share

Email

  • Automation
  • Cloud Software
  • Mobile

  • Automation
  • Cloud Software
  • Mobile

参考译文
用物联网设备模拟器解决物联网移动应用程序测试难题
插图:© IoT For All → 要成功推出一款物联网产品,部分取决于确保该设备本身能提供用户所期望的体验。但同样重要的是,还取决于对用户用于控制物联网设备的移动应用进行测试。许多消费级物联网产品——例如智能恒温器、联网门铃和健身器材——都依赖于运行在用户手机上的移动应用来提供管理界面并向用户传输数据。如果您的物联网移动应用无法正常工作,那么即使您的设备本身再优秀,也无法为用户带来良好的体验。因此,找到方法来测试物联网移动应用与其所连接设备之间独特的交互方式,是任何提供物联网设备的企业的软件测试策略中必不可少的组成部分。继续阅读,了解在应对这一挑战时需要考虑的因素,以及一个有效的物联网移动应用测试策略通常是什么样子。 “……寻找方法来测试物联网移动应用与其所连接设备之间独特的交互方式,是任何提供物联网设备的企业软件测试策略中必不可少的组成部分。” ——弗兰克·莫耶 物联网移动应用的测试要求 在某些方面,与物联网设备进行交互的移动应用提出了独特的测试挑战。要可靠地对这些应用进行测试,你需要模拟其在现实世界中运行的条件,而这一点可能颇具难度,因为大多数物联网应用依赖蓝牙网络与设备进行连接,而大多数测试自动化工具并未针对此类配置进行设计。其他挑战包括物联网移动应用可能使用各种不同的通信协议,这意味着测试工程师在规划测试时需要考虑更多变量。此外,移动应用从物联网设备接收数据的方式也可能不同。例如,某些物联网设备会持续地、实时地将数据流式传输给移动应用,而另一些设备则会定期推送更新,或者仅在某些时间段内进行连接。 不应如何测试移动应用 鉴于上述独特的挑战,你可能会想采用一种依赖人工测试的物联网移动应用测试策略,以评估应用与它所管理设备之间的交互效果。你可以派工程师带着手机亲自去执行操作——例如,踩动物联网自行车或按下智能门铃——并评估移动应用的响应情况。但这种方式并不理想。除了显而易见的耗时问题(每次应用更新时都必须重复这个繁琐的人工测试过程)之外,人工测试方法还难以在多种设备上进行广泛测试,因为你无法充分利用设备农场。相反,你只能依赖工程师手中的几台设备,而这些设备很可能只是客户实际使用设备中的一小部分。这将导致测试覆盖不全面,并增加了应用性能或可靠性问题未被发现的风险,直到它们真正影响到最终用户。 更好的方法 幸运的是,有一种更优的解决方案。你可以将你的移动设备农场与物理物联网设备模拟器进行连接,然后运行覆盖广泛场景的自动化测试,并能够可靠地模拟真实环境条件。物联网设备模拟器是一种特殊设备,它可以连接到移动应用,并向其发送与真实物联网设备相同的数据——不同之处在于,模拟器可以由工程师精确控制发送哪些数据。这意味着测试团队可以配置模拟器,以代表他们想要测试的全部用户行为,然后使用与客户相同的协议和连接方式将这些数据推送到物联网移动应用中。换句话说,如果你想要测试当用户在骑智能自行车上坡或突然刹车时,移动应用如何响应,你可以配置物联网模拟器向设备发送模拟这些行为的数据。或者,你还可以测试控制智能恒温器的应用如何响应环境温度的突然下降,或者移动应用如何处理用户长时间反复按压智能门铃的情况。 除了能够在广泛的设备上自动执行这些测试之外,这种方法还允许工程师利用基于云的测试软件。只要你的移动设备能与你的测试云平台集成,即使你的测试软件并未托管在本地,你也可以通过本地连接测试移动应用与物联网设备之间的交互。 物联网移动应用测试的未来 我在这里描述的物联网移动应用测试策略对于确保物联网设备及其所依赖的移动应用能满足用户期望至关重要,尤其是在物联网设备不断扩展和复杂化的情况下。当消费者物联网设备刚刚兴起、客户期望较低时,手动测试也许还能奏效。但在如今这个高风险的物联网时代,要进行有效的测试,你需要像物联网设备模拟器这样的自动化工具所提供的广泛覆盖率和对云友好的测试方式。 推文分享电子邮件 自动化 云软件 移动应用 → 自动化 云软件 移动应用
您觉得本篇内容如何
评分

评论

您需要登录才可以回复|注册

提交评论

广告
提取码
复制提取码
点击跳转至百度网盘