Selenium Vs WebTest

DZone 's Guide to

Selenium Vs WebTest

· Java Zone ·
Free Resource

Selenium and WebTest are two frameworks available for web test automation. This article compares both frameworks based on a set of 8 questions to help to choose between them.

1 ) Which one has the better IDE?
2 ) How easy / fast to write a comprehensive test case?
3 ) How easy is it to enhance and modify your test case scenario ?
4 ) Dealing with Javascript errors?
5 ) How easy is it to integrate your web test cases with project ?
6 ) What are the things that are in WebTest that you will miss in Selenium?
7 ) Documentation?
8 ) Generated Reports?


Which one has the better IDE?

Selenium has the better IDE , Selenium IDE is advanced and has a lot of luxuries. WebTest IDE is elementary.

How easy/fast to write a comprehensive test case?

In Selenium and WebTest it is easy to write test cases, but Selenium is much easier than WebTest ... of course this is related to point 1(Selenium IDE is advanced compared with WebTest)!

How easy is it to enhance and modify your test case scenario ?

In Selenium this will be easier because of 2 reasons:
a) The test case is executed on the browser , so anyone can easily guess what is the flow and can suggest enhancements on the test case, no need to take a look at the code to guess what this test case is doing.
b ) Because Selenium IDE gives u the ability to modify your test case in a very friendly straight forward way, WebTest IDE does not.

Dealing with Javascript errors?

Selenium does not care if there is a JavaScript error or not, so you cannot depend on Selenium alone to guess JavaScript errors in the application!!!
WebTest does care about JavaScript errors, and it will not let you continue your test till you fix all JavaScript errors.

The first impression regarding this point that WebTest is better, right?
But this is not the case always, because sometimes you have to deal with a project that has many JavaScript errors and all what you want and need is to test functionality , server-side validation , flow ….
Selenium is your hero here…

WebTest will not continue executing test case if it discover any javascript error so it will let you down here..
The optimum thing in my opinion is to have the ability to test functionality and flow regardless if there is Javascript errors or not, and to have the ability to find JavaScript errors in screens.
I mean Javascript error should not stop you from testing the flow and functionality for screens.

But how we can do that?
Simply you can use FireBug FireFox plugin which catch JavaScript errors while Selenium is executing the TestCases, this helped me a lot before , Trust me in this ;)
So my opinion for this point is:
Selenium + FireBug is much better than WebTest.. .

How easy is it to integrate test cases with project ?

WebTest integration with projects is easy! You can easily integrate it to your build file,and it is will become easier to use continues integration tools like CruiseControl to run test cases.
WebTest much better here.

What the things that are in WebTest that you will miss in Selenium?

In WebTest you can verify text inside Excel and PDF.


The same .. no one wins here!

Generated Reports?

WebTest Reports is better, but the difference is not that much.

Based on the above , I do recommend Selenium ...


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}