[yast-devel] WebYast - UI testing (status report)
Hi all, here is my report about UI testing of web applications. I checked two possible testing systems - Watir and Selenium. (Note: I haven't tested Selenium fully yet, this document just describes the current status, I'll continue the next week.) Watir ===== Homepage: http://wiki.openqa.org/display/WTR/Project+Home Installation: http://wiki.openqa.org/display/WTR/FireWatir+Installation Properties ---------- Tests are completely written in Ruby, objects on web page are represented by Ruby objects, e.g. button = browser.button(:value, "Click Here") My results ---------- It doesn't work for me :-( Following script require 'rubygems' require 'watir' browser = Watir::Browser.new correctly opens a new Firefox window, but it prints this error: Watir::Exception::UnableToStartJSShException: Unable to connect to machine : 127.0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox is running with '-jssh' option Running Firefox manually with -jssh option didn't help. Maybe the JSSh plugin doesn't work correctly in Firefox 3.5 ?? Note ---- It seems to be rather IE oriented, documentation contains IE related code and some features (fortunately minor) are missing in Firefox, see http://wiki.openqa.org/display/WTR/Firewatir+Compatibility Selenium ======== Homepage: http://seleniumhq.org/ Installation: http://seleniumhq.org/download/ Properties ---------- The tests can be created in an IDE (Firefox plugin) which records user actions in the browser and saves them into a testcase. You don't have bother about finding HTML element names on the page to create a test case. Test cases can be later loaded and replayed. You only need to add result checking commands to them. The most important thing is that it is possible to export a test case as a Ruby test script which uses SeleniumRC component. My results ---------- The plugin recorded/replayed my simple action in the browser correctly, I haven't tested yet the SeleniumRC component with Ruby, I'll continue the next week... -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Ladislav Slezak napsal(a):
Hi all,
here is my report about UI testing of web applications.
I checked two possible testing systems - Watir and Selenium.
(Note: I haven't tested Selenium fully yet, this document just describes the current status, I'll continue the next week.)
<snip/>
Hi, It is required to use ruby for testing web applications? When I at school play with web testing tools I find that there is few problems with it. First one is testing AJAX reactions, when some tools doesn't survive java script (or some type of java script) on page ( often throw exception). Second one is that sometime this tools needs some manual tuning to be enough robust to test after design changes ( like unnecessary parent id of tag ). Third one is that sometime act different from browser and that make hard to create regression tests for specific browser (like if we support opera and that interpret something different then firefox). Because it is hard to find good web testing tool maybe we should try also tools that doesn't create ruby testing code. JR -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
josef reidinger napsal(a):
Ladislav Slezak napsal(a):
Hi all,
here is my report about UI testing of web applications.
I checked two possible testing systems - Watir and Selenium.
(Note: I haven't tested Selenium fully yet, this document just describes the current status, I'll continue the next week.)
<snip/>
Hi, It is required to use ruby for testing web applications? When I at school play with web testing tools I find that there is few problems with it. First one is testing AJAX reactions, when some tools doesn't survive java script (or some type of java script) on page ( often throw exception). Second one is that sometime this tools needs some manual tuning to be enough robust to test after design changes ( like unnecessary parent id of tag ). Third one is that sometime act different from browser and that make hard to create regression tests for specific browser (like if we support opera and that interpret something different then firefox). Because it is hard to find good web testing tool maybe we should try also tools that doesn't create ruby testing code. JR
Quite interesting list of tools for web testing http://www.softwareqatest.com/qatweb1.html -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
josef reidinger napsal(a):
Ladislav Slezak napsal(a): [...] Hi, It is required to use ruby for testing web applications? When I at school play with web testing tools I find that there is few problems with it.
Why we should not write tests in Ruby when we use Ruby for the application?
First one is testing AJAX reactions, when some tools doesn't survive java script (or some type of java script) on page ( often throw exception). Second one is that sometime this tools needs some manual tuning to be enough robust to test after design changes ( like unnecessary parent id of tag ).
Both systems (Watir and Selenium) use browser plugins, they use real browsers for testing. The plugins are used just to control the browser, they only send button clicks etc. to browsers. They acts as a proxy to browser. Javascripts are interpreted by browsers, AJAX should work without problems.
Third one is that sometime act different from browser and that make hard to create regression tests for specific browser (like if we support opera and that interpret something different then firefox).
The same applies here, Watir and Selenium use real browsers, SeleniumRC component can control and use multiple browsers in parallel for testing (see http://seleniumhq.org/docs/05_selenium_rc.html )
Because it is hard to find good web testing tool maybe we should try also tools that doesn't create ruby testing code.
With Ruby code we can easily automate testing, no need to start an extra browser plugin and manually replay all tests... Today I'll check Selenium framework and I'll post the results here... -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Ladislav Slezak wrote:
Today I'll check Selenium framework and I'll post the results here...
[Ooops, sorry for the delay...] The Selenium framework seems to be very feature rich and supports many browsers/systems/programming languages. I have integrated it into WebYast already, it is documented on wiki page http://en.opensuse.org/YaST/Web/Development/UI_Testing You will need additional packages for automatic testing, they are in the YaST:Web repository (see the link for details). Currently there is one example, just run 'rake test:ui' in web-client/webclient directory. (It starts a new Firefox instance for tests, be prepared for that...) -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
josef reidinger
-
Ladislav Slezak