移动app中断测试之来电中断

移动app中断测试之来电中断


智能设备功能的日益强大和用户使用场景的多样性,使一款APP在移动设备端中断操作非常频繁,APP在中断场景的表现直接影响用户体验,中断测试是APP功能测试的必测内容。如下图。



这些软件使用网络进行通话或者视频,与运营商电话网络形式不同,所以非常有必要做中断测试。来电中断的测试场景添加如下图。



中断测试要点 

中断详细包括以下:

一. 来电中断:呼叫挂断、被呼叫挂断、通话挂断、通话被挂断  

二:短信中断:接收短信、查看短信 

三:其他中断:蓝牙、闹钟、插拔数据线、手机锁定、手机断电、手机问题(系统死机、重启)  

中断场景: 

在以下场景介入外部事件(来电、短信、插拔数据线等) 

1. 登陆界面load时交互信息数据 

2. 读取好友列表界面load时交互信息数据(最密好友列表刷新、好友列表刷新)

3. 好友列表界面load时交互信息数据(添加、删除好友时)


游戏中断 :

中断操作: 
在游戏从开始起,一直到游戏完全退出,都算游戏过程,此过程中,游戏中的任何一屏,都应该可以中断,平且正常返回,且不会出现任何问题。游戏在中断后,应该会显示出一个暂停屏,此屏一般为黑底,提示信息为:“press center/5 key to continue” 或“按中心键/5键继续”。按中心键后游戏继续运行

举一个中断测试的案例:
最近一个项目,大量用到时间中断,也经常出现各种bug,为了查找原因,特意做了几个小test


1 using UnityEngine;  
2 using System.Collections;  
3   
4 public class test : MonoBehaviour {  
5   
6     // Use this for initialization  
7     IEnumerator  Start () {  
8       
9         InvokeRepeating("test1",0f,1f);  
10             //yield return new WaitForSeconds(1f);  
11             CancelInvoke("test1");  
12             yield return null;  
13         }  
14           
15         // Update is called once per frame  
16         void Update () {  
17           
18         }  
19           
20         void test1()  
21         {  
22             Debug.Log(Time.time);  
23             Debug.Log("haha");  
24         }  
25     }  

什么都不输出

如果把name="code" class="csharp">yieldreturn new WaitForSeconds(1f);加上

下面这段代码,就canel不掉,***的坑爹啊

1 using UnityEngine;  
2 using System.Collections;  
3   
4   
5 public class test : MonoBehaviour {  
6   
7   
8     // Use this for initialization  
9     void  Start () {  
10           
11             StartCoroutine("createstart");  
12         }  
13           
14         // Update is called once per frame  
15         void Update () {  
16           
17         }  
18           
19         IEnumerator createstart()  
20         {  
21             int i=0;  
22             while(true)  
23             {  
24             InvokeRepeating("test1",0f,1f);  
25             yield return new WaitForSeconds(5f);  
26             CancelInvoke("test1");  
27                 print("ok i ge");  
28             yield return null;  
29                   
30             }  



1 using UnityEngine;  
2 using System.Collections;  
3   
4 public class test : MonoBehaviour {  
5       
6     public bool isok=true;  
7     // Use this for initialization  
8     void  Start () {  
9       
10             StartCoroutine("createstart");  
11         }  
12           
13         // Update is called once per frame  
14         void Update () {  
15           
16         }  
17           
18         IEnumerator createstart()  
19         {  
20             int i=0;  
21             while(isok)  
22             {  
23             InvokeRepeating("test1",0f,1f);  
24             yield return new WaitForSeconds(5f);  
25             isok=false;  
26             CancelInvoke("test1");  
27                 print("ok i ge");  
28             yield return null;  
29                   
30             }  
31         }  
32           
33         void test1()  
34         {  
35             Debug.Log(Time.time);  
36             Debug.Log("haha");  
37         }  
}  

目前能做中断测试的一些公司,我知道的有TestFlight、TestFairy、TestBird、GooglePlay等等。
#安卓工程师#
全部评论
好东西 ~! 顶
点赞 回复 分享
发布于 2016-03-24 10:38

相关推荐

2025-12-02 19:33
辽宁科技大学 golang
Richard奇:还得是有鹅选鹅
点赞 评论 收藏
分享
评论
点赞
4
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务