Who uses HtmlUnit?

363 views
Skip to first unread message

Mimmo Cosenza

unread,
Oct 6, 2013, 7:23:22 AM10/6/13
to clojurescript@googlegroups.com MList, clo...@googlegroups.com
Hi all,
did anyone give a try to this java based HTMLUnit headless browser for cljs unit test to be used of phantomjs?

http://htmlunit.sourceforge.net/

Thanks

Mimmo

Kelker Ryan

unread,
Oct 6, 2013, 9:40:38 AM10/6/13
to clo...@googlegroups.com, clojurescript@googlegroups.com MList
 I've never tried it for unit testing, but it's the de facto Java library for headless browsers and it's the driving force behind products such as Selenium WebDriver => http://seleniumhq.org/
 
I mostly use it for bot creation/automation and it supports many versions of popular web browsers such as Firefox (3.6, 10, 17), Chrome (+ 16), and IE (6, 7, 8, 9) => http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/BrowserVersion.html
 
06.10.2013, 20:23, "Mimmo Cosenza" <mimmo....@gmail.com>:

--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

John D. Hume

unread,
Oct 6, 2013, 10:37:27 AM10/6/13
to clo...@googlegroups.com
WebDriver's HtmlUnitDriver is only one of many supported drivers. Most Selenium-using teams I've been on have driven real browsers using another driver (which among other benefits allows one to generate realistic screen shots). 

The one team I was on that used HtmlUnit (a couple years ago) blamed it for sporadic test failures and had their own patched version that supposedly fixed concurrency issues (that they'd submitted as a patch but had not been accepted). I wasn't close to that research, so I can't attest to the issues personally.

Niels van Klaveren

unread,
Oct 6, 2013, 12:17:15 PM10/6/13
to clo...@googlegroups.com, clojurescript@googlegroups.com MList
I've used HTMLunit, but the Javascript implementation used is rather slow compared to regular JS in browsers.
Since the webframework I need to test is rather JS heavy, this is a pretty big problem.
I had hopes that they would switch from Rhino to Nashorn, but there currently aren't plans for that.

Also, it has it's own idiosynchrasies browserwise, and I couldn't convince our developers to work around those by supporting yet another browser, just for testing.

It would be marvellous to have a headless browser that uses less resources than a regular, but for my uses HTMLunit just didn't cut it.
I should take a look at the PhantomJS browser and Ghostscript (and it's Webdriver support) one of these days.

Niels van Klaveren

unread,
Oct 7, 2013, 5:32:51 AM10/7/13
to clo...@googlegroups.com, clojurescript@googlegroups.com MList
Didn't see this was posted in the general Clojure group, and thought this had been posted in another group.
So if you want to do any automated web testing be sure to check out clj-webdriver, the clojure library for Selenium Webdriver and it's Google Group.
Selenium is the java platform for browser automation, supporting most browsers as well as headless browsers like HTMLunit and PhantomJS.


On Sunday, October 6, 2013 1:23:22 PM UTC+2, Magomimmo wrote:

Mimmo Cosenza

unread,
Oct 7, 2013, 5:12:47 PM10/7/13
to clo...@googlegroups.com, clojurescript@googlegroups.com MList
Thanks to everyone for the very informed advices.

As soon as I have time and energy :( I'll take a look at this last cli-webdriver. 

Thanks again to everyone

mimmo

Reply all
Reply to author
Forward
0 new messages