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
Jemmy provides all the support for verifying this. Check documentation and
samples for more info.
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: