ZATS does not work with combobox MVVM @save

asked 2013-04-05 09:36:47 +0800

daquan198163 gravatar image daquan198163
9 1

updated 2013-04-05 09:40:49 +0800

有一个很简单的页面,采用MVVM模式实现的表单验证和提交,手工测试都没问题, 但是用zats写的测试就会失败,我发现原因是 zats选中的comboitem值并没有绑定到ViewModel导致

zats version:

  • zats-common-1.1.0.FL.20120710.jar
  • zats-mimic-1.1.0.FL.20120710.jar
  • zats-mimic-ext6-1.1.0.FL.20120710.jar

The function has passed manual testing,but failed with zats. The related code as below:

//A simple combobox

<combobox id="todoOwnerCombobox" model="@load(vm.qualityPlan.participantList)" selecteditem="@save(todoForm.owner)" readonly="true" hflex="true" autodrop="true" mold="rounded" buttonvisible="true">

//zats test

todoFormGroupboxAgent.query("textbox").type("summary text");

desktop.queryAll("#todoOwnerCombobox > comboitem").get(1).as(SelectAgent.class).select();


todoFormGroupboxAgent.query("#todoEditor").type("memo text");


From the error log and debug info,the cause is that,selectedItem="@save(todoForm.owner)" failed to bind value to ViewModel.

delete flag offensive retag edit

2 Answers

Sort by » oldest newest most voted

answered 2013-04-10 05:48:24 +0800

neillee gravatar image neillee flag of Taiwan
1692 1 5

Currently, ZATS could not be used to test ZK application that uses MVVM pattern. ZK has another testing framework called ZTL that could be used in situations like this. For more information, please go to ZTL at github. You can also find examples of testcases written in ZTL in ZTLTEST, also at github.

link publish delete flag offensive edit

answered 2013-04-11 08:59:20 +0800

daquan198163 gravatar image daquan198163
9 1

多谢! 请问ZTL跟ZATS相比主要区别是什么,有哪些优势?

另外这种场景能支持么:点击按钮打开模态窗口 我用zats测试时发现点击按钮后query不到新打开的窗口。

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2013-04-05 09:36:47 +0800

Seen: 37 times

Last updated: Apr 11 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More