简体   繁体   English

Android聊天应用测试

[英]Android chat app testing

Consider a simple chat app, you can send and receive text messages. 考虑一个简单的聊天应用程序,您可以发送和接收短信。 I need to perform some black box testing, but have no idea how to co-ordinate two clients. 我需要执行一些黑盒测试,但不知道如何协调两个客户端。

For example: 例如:

Let's assume that the test is to check if user1 can sent a message to user2 . 假设测试是检查user1可以向user2发送消息。 Here, I can make user1 send message using Robotium but how to assert if user2 (ie on other device/emulator) has received the text. 在这里,我可以让user1使用发送短信Robotium但如何,如果断言user2 (即在其他设备/仿真器)已收到的文本。

The normal way for something like this is to do two tests, one for each case. 这样的正常方法是进行两次测试,每种情况一次。 So with only one device/emulator, you write a test that verifies the correct behaviour when a message gets sent and another test for when a message gets received. 因此,仅使用一个设备/仿真器,您就可以编写一个测试来验证发送消息时的正确行为,并编写另一个测试来验证接收消息时的行为。 You only need one device/emulator. 您只需要一个设备/仿真器。

The kind of test you are describing is technically possible, but you need to build out quite a bit to make it happen, as robotium by itself will not be enough for this. 您描述的这种测试在技术上是可能的,但是您需要花很多时间才能实现它,因为仅凭机器人本身不足以做到这一点。 Not sure it's worth it. 不确定是否值得。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM