Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Selenium or HtmlUnit

 
Victor M. Pereira
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been wondering for a while which presentation testing framework to use. I know that HtmlUnit simulates a browser and is merciless on bugs that other explorers simply ignore.
I also know that Selenium uses real explorers and through them tests the page. The question is which one should I choose, since some things can't be automatically tested like how a page looks.
However for the things that can be automatically tested, does it really matter which framework I use. In which case does choosing one over the other makes a real impact?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly how complex are these HTML pages you want to test and how deep is the user interaction?

Bill
 
Victor M. Pereira
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's more for TDD, though I expect to use jQuery and a couple of google code javascript libraries for graphs and charts. I don't expect to use drag and drop, but there is always the chance. I do want it with Ajax.

So the question would be more focused as in: if you're starting a project with TDD which one would you choose. Assuming the maximum cross-browser compatibility
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not looked at Selenium or HtmlUnit so have no suggestion there.

When I did this sort of thing some years ago it seemed easier to write a custom user simulator based on the Apache HttpClient toolkit and a script written in XML to carry a "user" through a long sequence of pages and states.

Given the large number of toolkits you plan to use, trying to test all pathways in the finished application looks pretty difficult. My inclination would be to devise simplified sub-systems which could be tested outside the full environment.

Bill


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic