Fastpoint
级别: 总版主
精华:
44
发帖: 5033
基地声望: 390 点
基地币: 1656 Bug
基地贡献: 0 点
好评度: 15 点
在线时间:818(小时)
注册时间:2005-10-08
最后登录:2008-07-22
|
number of utilities to facilitate inspecting the GUI hierarchy itself. Jemmy provides a few different lookup classes that find a component based on different criteria built into the class; the programmer needs to pick the right lookup class based on knowledge of the hierarchy. JFCUnit provides component-specific lookup classes, e.g. AbstractButtonFinder. These are used in conjunction with a test helper class to look up a desired component. Marathon mainly expects to find components by name, assuming the use of Component.setName(). Architecture/Extensibility Mostly this consists of “what do I have to do to test a custom component”? Chances are, nothing. You can build up basic clicks and keystrokes to control most anything, but you probably want something that explicitly exports the “spin me till I’m dizzy” action (assuming you’re not the developer; if you were, you’d already have that as a public method on your class, right?). Abbot provides for extending the basic tester classes for new components, and has a well defined method for naming those new actions so they are automatically available at the scripting level. It also provides extensibility for converting strings from scripts into arbitrary classes, and introducing new individual steps into scripts. Scripts can call directly into java code (the script is actually just a thin veneer over method calls). Jemmy has a rather high hurdle for introducing a new operator, although you are by no means obliged to duplicate your entire API in the operator. Jemmy has a higher-level xml-based scripting tool called Jelly (no relation to the apache tool) that facilitates higher-level application actions, and I believe this is extensible. It is what the netbeans IDE group uses to test the IDE. JFCUnit requires you define new event types for your component derived from the basic ones, e.g. MyComponentMouseEvent derived from AbstractMouseEvent. Since Marathon is based on Jython, you can either provide your own Python libraries or call into underlying Java code. Testing Context Do you run one test in isolation, many with the same fixture, or every test in a new fixture? Everyone has some integration with JUnit. Abbot provides both a script environment and a JUnit fixture, both of which handle setup and teardown of the complete GUI environment. Scripts also support launching a single application instance and including other scripts. I’m not familiar with what the other frameworks provide, but I’m sure they
|
可不可不要这么样徘徊在目光内 你会察觉到我根本寂寞难耐 即使千多百个深夜曾在梦境内 我有吻过你这毕竟并没存在
人声车声开始消和逝 无声挣扎有个情感奴隶 是我多么的想她 但我偏偏只得无尽叹谓
其实每次见你我也着迷 无奈你我各有角色范围 就算在寂寞梦内超出好友关系 唯在暗里爱你暗里着迷 无谓要你惹上各种问题 共我道别吧别让空虚使我越轨
|
|
[4 楼]
|
Posted: 2005-11-29 14:13 |
| |