UI Testing solution(转自网络一篇文章,写的很good,分享)

上一篇 / 下一篇  2013-08-05 16:55:35 / 个人分类:Jellytool 相关

UI test.

UI test work-flow could be broken to three kinds of steps:

  • Find controls you need to do next action for
  • Do something with that control
  • Verify results of the action

Find and Do

First two parts should look something like this, then

Starting from some hierarchy root,

look for a control with certain characteristics,

and do something meaningful to it

       

Which, with Jemmy, looks like this

SomeHierarchyRoot.lookup(new SertainCharacteristics()).

as(SomeMeaningfulControlInterface.class).do();

       

Verify

Test could verify

  • UI feedback

Jemmy provides all the support for verifying this. Check documentation and samples for more info.

  • Some controls to appear

This comes back to component lookup.

· Some controls properties to change

Again, either the lookup or waiting for a control property to be equal to something.

· Image update

Use Jemmy image API.

· Non-UI feedback

Well ... since the test is written in Java, there should not be any problem to implement any kind of check, is there? Just remember to wait for a result - do not verify it right away. You could use Jemmy waiting API for that.

  • File been created or updated
  • Database record created
  • Sun goes up :)

Old main mage locatedhere

- See more at: http://jemmy.java.net/#sthash.vy0GtRVo.dpuf



TAG:

 

评分:0

我来说两句

日历

« 2024-04-27  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 33383
  • 日志数: 73
  • 建立时间: 2013-08-01
  • 更新时间: 2014-02-17

RSS订阅

Open Toolbar