0

Testing with Selenium

asked 2006-12-06 20:26:34 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4047472

By: manuel_moreno

Hello,

I've tryed to do some functional testing with Selenium, and it doesn't work.
I think it is not compatible with ZK.

I did my first test where the user inputs username and password, then clicks the login button.
Apparently it is not compatible. When I run the test, I see Selenium fills the fields and clicks the login button but I get a ZK validation message "username is a mandatory field".
So basically what happens is that when the event goes to the server, the
Texbox.getText() is returning an empty String. This is quite strange as I can see that Selenium was able to put the username on the browser.

I also think there is another problem. When I see the HTML source that ZK generates, It uses ids to identify the elements, but this ids are different from the zul source.
When you record a test in Selenium it uses this ids to identify components and be able to use them. The problem is that the ids ZK generates are could change if some source is changed in the zul code, so the test would stop working.

Would it be possible to fix this issues to make ZK compatible with Selenium?

Are there any other functional testing tool which I could use, compatible with ZK?

Thank you,
Manuel Moreno.



delete flag offensive retag edit

9 Replies

Sort by ยป oldest newest

answered 2006-12-08 09:13:22 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4049796

By: henrichen

1. I tried the Selenium IDE with a simple ZK page. It seems when Selenium fill out textbox, it does not fire corresponding onblur, onfocus, etc. Those are important triggering point for the ZK Ajax framework. Unless those event is properly simulated, I don't think it is compatible with ZK.

2. Those id is uuid so they are different from the zul soruce. And yes, the uuid can change if some source is changed. This is the second issue.

3. ZK may provide some kind of "recording" mechanism and at least allow playback in the component's id level.

/henri

link publish delete flag offensive edit

answered 2006-12-08 17:36:35 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4050454

By: manuel_moreno

Hi henri,

I have investigated a little further,

I think that the second issue is the most important, because if it is not resolved somehow, it will be difficult to integrate ZK with any automated web testing tool, since if your source changes the uuid could change and you could get false faliures of your already developed tests. It would be an extra effort to distinguis between real faliures and false ones, and also more effort to fix the broken tests.

I've got some ideas, Possibly they don't fit into the ZK architecture, but maybe it is of some help so here they go:

Idea 1.- Add an optional tag to the components, call it uuid, or custom-uuid, which would be unique in the desktop. ZK in the rendering phase could add a prefix to the custom-uuids, so that they don't conflict with the ones that ZK generates.
This solution adds a extra effort to the developers who want to use automated web testing, because they must use id and custom-uuid. The developers would have to keep track of the custom-uuids they use so that they don't repeat them.

Idea 2.- Define a deterministic uuid generation rule for the components that have an id set on the zul code. This generation rule should be based on the fact that ids are unique in the namespace. The generated uuid, should be something similar to an access path to the components.
This idea is better in the sense that is lower effort for developers, they don't need to do anything else, but maybe the length of the generated uuid is very long, I don't know if that matters very much.
Maybe the extra effort for the developers is to set the id for macrocomponents, as they generate their own namespace... and what we need is to get an invariant uuid



For the first issue (Selenium not firing the events correctly) I think it is because Selenium is only generating the events it needs to fill the components with the values, but Selenium team didn't think that for filling the forms, they also had to fire the onFocus events and so...
I don't know why ZK needs this events triggered to simply fill a component with a value... are there important things happening behind the scene with that events?

Thanks,
Manuel.

link publish delete flag offensive edit

answered 2006-12-11 01:46:59 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4052766

By: henrichen

For the event issue, the textbox component count on the Javascript event to fire the ZK onChange event and sends entered value to the Java component of the textbox in server side.

The uuid issue. I agree with you that it is the tough one. Unless we can record and identify the concerned component some way, or any such pure browser side testing tool is not possibly working with ZK.

/henri

link publish delete flag offensive edit

answered 2007-02-21 15:09:23 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4169902

By: jwyseu

It is possible for selenium to fire events of a component. So you can add a fireEvent "id of component" change/focus/blur to the script to simulate the events. I got it working for a textbox in this fashion. The script will get complicated very fast though and you have to know which events to call and in what order.

For a textbox, the following worked:
<tr>
<td>fireEvent</td>
<td>_pc7</td>
<td>focus</td>
</tr>
<tr>
<td>type</td>
<td>_pc7</td>
<td>textToInsert</td>
</tr>
<tr>
<td>fireEvent</td>
<td>_pc7</td>
<td>blur</td>
</tr>

I was trying something like that for a listbox (used as a grid) but did not find the right event to trigger the select.

We still have the problem of the changing ids ...

link publish delete flag offensive edit

answered 2017-09-15 18:27:14 +0800

johnybasha gravatar image johnybasha
1

updated 2017-09-18 09:59:22 +0800

cor3000 gravatar image cor3000
4406 2 7
ZK Team

Post deleted by moderator.

link publish delete flag offensive edit

answered 2017-09-18 14:17:46 +0800

iniyazhini gravatar image iniyazhini
1

for more functional testing tool, you can contact http://loginforexcellence.com/selenium-testing-training.html (Selenium Testing Training in velachery)

link publish delete flag offensive edit

answered 2017-09-20 20:13:00 +0800

nektarios gravatar image nektarios
1 1

Hello, check this out https://www.zkoss.org/wiki/Small_Talks/2013/July/ZK_Testing_with_Selenium_IDE (https://www.zkoss.org/wiki/SmallTalks/2013/July/ZKTestingwithSelenium_IDE)

I think if solves the above problems.

link publish delete flag offensive edit

answered 2018-11-19 14:32:26 +0800

smitapawar610 gravatar image smitapawar610
1

Some of the widely used functional test automation tools, which are mostly preferred by the testers as well as QAs are:

Selenium HQ, TestingWhiz, Ranorex, TestComplete, Rapise.

Try to use this tools.

link publish delete flag offensive edit

answered 2018-11-21 14:05:16 +0800

smitapawar610 gravatar image smitapawar610
1

Best functional test automation tools used by testers are:

Selenium:

Selenium is open source software for browser automation, primarily used for functional, load, or performance testing of applications.

TestComplete:

TestComplete is a test management and functional, performance testing tool, from SmartBear Software headquartered in Somerville, Massachusetts.

Oracle Application Testing Suite:

Oracle Application Testing Suite is a comprehensive testing solution, for load, functional and performance testing.

SoapUI NG Pro:

SoapUI NG Pro is an open source functional and load testing tool, supported by Boston-based developer Smartbear Software.

Ranorex Studio :

Over 14,000+ users worldwide automate tests with Ranorex Studio, which promises to enable rapid delivery of high-quality desktop, mobile, and web applications.

link publish delete flag offensive edit
Your reply
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

Follow

RSS

Stats

Asked: 2006-12-06 20:26:34 +0800

Seen: 707 times

Last updated: Nov 21 '18

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