ZTL issues
I have some issues with this.
I made fork from repo on http://code.google.com/p/zk-ztl/
han I made fork from repo on https://github.com/zkoss/ztl
What fork should I support to be up to date with you?
@ halyph
The ztl in google code is the old version for Selenium-RC .
and jira is the official ZTL issue tracker.
About third question ,do you mean that you want to test automatically everyday?
@matthewgo
I need to get ZTL compatible jq selectors. But, plain Selenium doesn't work well for this purpose.
@matthewgo
So I should follow repository on github to up to date with you?
@crc83
google code is ztl 1.0.0 for selenium rc
github is ztl 2.0.0 for selenium web driver
Whether to choose goodlecode or github will depend on your requirement and the use case.
@matthewgo
Is there some reqirements for thouse, who whant to contribute in a project?
Hi All,
Let me clarify the confusion for you
1. What's the official ZTL home page?
http://www.zkoss.org/product/ztl
2. What's the official ZTL issue tracker:
Jira - http://tracker.zkoss.org/browse/ZTL
3. What's the differences between the two source code repositories.
* ZTL 1.0.0 (with our own vision test) for Selenium RC
- http://code.google.com/p/zk-ztl/
* ZTL 2.0.0 for Selenium Web driver
- https://github.com/zkoss/ztl/
The reason we keep both repositories is that the Selenium Web driver does not support the vision test well,
and currently the web driver version is not stable for all of the browsers. But for ZK app developer they can choose which version is suitable to their requirement.
In ZK framework development environment, we use two repositories at the same time, ZTL 1.0.0 for our vision test and ZTL 2.0.0 for our function test.
can I help you to migrate vision tests from ZTL 1.0.0 to ZTL 2.0.0?
maybe some inputs from your sied can help me to start faster.
That means we have to change selenium-server (2.x) source code?
I tried before to use the official selenium web driver API, but in IE it will snapshot the different scene from the original screen that is the reason I went back to use the ZTL 1.0.0 version.
And the selenium web driver doesn't support Safari browser yet. From the functional-wise the vision test in ZTL 1.0.0 is more power than that Selenium 2.x provided.
If you can solve those issues for us that would be great. :D
I'm using Selenium 2.7 and corresponding IE Web Driver. I made some fixes in ZTL so captureScreenshot works fine with IE.
You could see https://github.com/crc83/ztl/commit/67896fe35ffed40096e4e7ce96eeb048bda5cd2e
file : ztl/ztl/src/main/java/org/zkoss/ztl/ZKTestCase.java
public void captureScreenshot(String filename) {
try {
if (isIE()) {
File screenshot = ((InternetExplorerDriver) getWebDriver()).getScreenshotAs(OutputType.FILE);
File dest = new File(filename);
if (dest.exists()) {
dest.delete();
}
screenshot.renameTo(dest);
} else {
getCurrent().captureScreenshot(filename);
}
System.err.println("Saved screenshot " + filename);
} catch (Exception e) {
System.err.println("Couldn't save screenshot " + filename + ": " + e.getMessage());
e.printStackTrace();
}
}
From the tracker I posted, it is not solved yet - http://code.google.com/p/selenium/issues/detail?id=2247.
Have you checked whether it captures a unnecessary scrollbar in IE?
I didn't saw any scrollbar issues.
I'm using IE9 on windows 7.
maybe this issue is related to specific component? I could check it on my environment.
Another question for ZKoss team.
I'm locating elements of the tree in next way
public ClientWidget treeCellByLabel(String label){
return jq("@treecell[label=\""+label+"\"] div.z-treecell-cnt");
}
Is there some convenient methods to extract default zClasses for components?
Could zClasses change in future?
You can use the following instead.
return jq("@treecell[label=\""+label+"\"]").toWidget().$n("cave");
@jumperchen,
I have the next questions:
1. We are working with tables, trees and grids. Could you please suggest some meaningful samples how we can test such components?
2. Can we use "HtmlUnit Driver" just to avoid Browser usage? What's you experiences with this? Does "HtmlUnit Driver" work fine with ZK?
@Halyph
1. The answer is depended on which aspect would you want to test for? In ZK internal testing, if we want to test the layout display, we will use vision test to compare the images, and most of the cases in the grid, tree, tables, or layouts are layout display issue.
2. Yes, you can use HtmlUnit to test with ZK. In the past, I have only tested a few cases that work well, but not too many. From my thought at that time, the HtmlUnit is not mush fast than opening a chrome browser to test.
By the way, if you want to test a dynamic zul page in ZTL, the new Scala support in ZK project is mush fast than the ztl format to compile it (I mean the productivity for writing ZTL), you can take a look at this example.
@jumperchen,
Regarding tables, trees and grids components. All these components are build via Java code, almost all zul file are plain <tree>, <grid> tags without complicated zul customization. And we need to walk through the tree, verify tree cells, tree expands, hide/show tree column, validate data, etc.
I.e. simulate different users behavior.
Could you please suggest some proved way for testing such cases?
@jumperchen,
Hi, I made small article related to subject. Maybe it will be interesting for you and community
http://crc83.blogspot.com/2011/10/zkoss-ui-testing-experience.html
Thanks Белей Сергей for your work.
ZK - Open Source Ajax Java Framework
Hi All,
I'd like to clarify several ZTL related issues:
1. What's the official ZTL home page?
a) http://code.google.com/p/zk-ztl/
or
b) https://github.com/zkoss/ztl
2. What's the official ZTL issue tracker:
a) Jira - http://tracker.zkoss.org/browse/ZTL
or
b) GitHub issue page - https://github.com/zkoss/ztl/issues
3. Can I somehow record ZK UI actions via Selenium to automate this routine process?
4. What's the official ZTL related communication channel? (I guess this forum :-)