In our QA team, we run a set of automated tests for every commit that developers make. Since there are many such commits, and no developer wants to wait more than a few minutes to get feedback, we are limited to 5 minutes of testing. In these 5 minutes we want to run as many tests as possible.
We found that selenium tests are best for our needs: mainly because they are reliable. If the selenium test reports a JS error, you are 95% sure that this is a real error. (This is an extremely important property, as we learned from our experience using HTMLUnit). However, selenium tests are slow and hard. (We support a small cpu farm, so we can run many selenium servers and many scripts asynchronously).
We recently proposed a new approach - use selenium only for those places where you really need it: pop-ups, ajax, JS in general, .. In other places use the "Text Browser". For example, if you want to verify that the following link "works":
<a href='/somewhere'> link </a>
You do not need selenium. You can execute a GET request on the page, and then use regex / parse page and use xpath / .. Bottom line - you don't need the JS engine . It is clear that this is much easier and faster.
We had great success in this approach, and we came across the following links:
<a href='/somewhere-1' onclick="foo()" > link 1 </a>
<a href='/somewhere-2' onclick="foo()" > link 2 </a>
... many more such links ...
So, in this case you really don't need to run the selenium script that clicked each link. Just click on one of them using selenium (to test the functionality of the JS function foo()) and then use a text browser to check hrefother links.
My question is: where do you think we should draw the line? and I would be glad to hear your opinion - are there any Textual Browser tools (we did not work with WebDriver)?