How To Write Test Cases

上一篇 / 下一篇  2008-08-19 20:52:31 / 个人分类:Test Cases

一,书写Test Cases时,请首先理解以下手机术语的意思 1.Confirmation note: 确认通知, 当手机询问你是否要做某项操作时,如果得到肯定答复,则会在操作完成后给出一条confirmation note。 2.Confirmation query: 确认请求,询问是否要做某操作,如删除?关闭某应用程序?退出浏览器?等. 3. Error note: 当用户请求无法完成时,手机会提示操作失败信息。如信息发送失败,无法连接服务器,IR传输失败等等。 4. Information note: 手机自动提示的信息,如:正在充电,电池已充满,电池电量低,失去网络连接等等。 5.Wait note: 提示用户等待,如:正在请求服务,正在打开游戏,正在打开应用程序,正在发送短信等等。 6.Data query: 手机要求用户输入某些信息,如姓名、IP、电话、Email、主页地址等,这些信息请求称为data query. 7. Soft notification: 软通知?手机会提示用户在他没有留意或不在时发生的一些事,如:有未接来电,收到短信,收到网络服务,收到名片,收到网络铃声等,这些notification 会一直停留在屏幕上,直到用户作出响应。 8.Note: 分两种,confirmation note, information note, error note, wait note 都是暂时出现并自动消失的; 另一种是备忘录,birthday note, call note, meeting note等,与reminder soft notification 一同出现。 "理解了以上术语的意思,有助于书写测试步骤或者预期结果时使用概括性语句例: 1.If Min.time is less than 1s,It should pop-up an error note 2.It will pop-up a piece of information when message full in SIM"

二.如何写好Test Case的Title? 1.Title一般由动词或者名词开头,最好不要用介词开头 "例: 1.Launch a call from phonebook 2.Key press (DTMF) during call 3.By……" 2.书写Title前,要考虑周全Case所需的前提以及执行后所期待的结果 "例:要验证在户外模式下接听一个电话,手机所表现出来的情况,可以这样写:Check MS has a good behaviour when receiving a call in Outdoor mode" 3.书写异常/极限条件下的Test Case时,Title最好使用Try to这样类型的词语开头 "例:当内存满时,继续下载多媒体文件保存,可以这样写:Trying to download multimedia file via WAP while memory is full." 二.如何写好Test Case的Step 1.Step1,Step2,Step3……最好由Step1交待激活应用路径,Step2开始检查测试关注点 "例:书写播放录音记录后再进行录音,可以这样写: 1.Go in gallery-recordings 2.Play some recorded files 3.Go in media--Voice Recorder 4.Record new recordings" 2.Step交待应用激活路径的时候,最好选择Go in类型的词代替Press,Select等词语。这样写的好处:第一可以省略冗余的步骤,第二可以抛弃手机是通过何种方式(按键?触摸屏?)激活应用的。 3.上一步骤与下一步跨跃不要太大,避免给人断层之感 "例:书写录音并检验录音文件的播放效果时,可以这样写: 1.Go in media--Voice Recorder 2.Record 5 voice recordings of 1Min each 3.Go back to main menu 4.Go in gallery-recordings 5. Look at the size of the recorded files 6. Listen to 3 recorded files 如果省略了Step3,就会留下麻烦给某些测试工程师,尤其对New Engineers" 4.一条Case的Step避免过多,如果遇到循环操作,或者从某一步骤退出应用,可以使用Repeat Step1--StepN,End StepN 来描述。 三.如何写好Test Case的Expect Result? 1.预期结果和步骤之间的关系不是一一对应的,有些步骤可以省略预期结果,有些步骤可以产生多个结果 "例1 Step 1.Go in gallery-recordings 2.Delete several recordings 3.Record new recordings Expect Result 1.Check recording list is good displayed 2.Recordings will be deleted 3. (1)Check that MS is able to record new files after some memory space was free (2)Check that those files are available in correct folders (3)Acknowledge MS good behaviour during the whole test." "例2 Steps: 1.Go in call animation setting menu (settings --> display --> call animation 2.Set call animation different from default one. 3.Set now default call animation as call animation 4.Receive a call 5.Set up a call 6.Restart mobile Expected Results: 1.Check that default call animation is played when receiving or setting up a call." 2.预期结果里涉及的UI问题,未能准确确定下来的,尽量不要写上具体的Items,可以用这样的语句来表示:Check that/Verify it is good displayed 3.预期结果里涉及未能确定下来的功能问题,可以用这样的语句来表示:Check that function works good


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

我的栏目

日历

« 2011-06-08  
   1234
567891011
12131415161718
19202122232425
2627282930  

我的存档

数据统计

  • 访问量: 979
  • 日志数: 2
  • 建立时间: 2008-08-19
  • 更新时间: 2008-08-20

RSS订阅

Open Toolbar