WebDriver test automation is like driving a taxi

What is Selenium WebDriver?

The official site says that
WebDriver is a tool for automating web application testing, and in particular to verify that they work as expected.

It aims to provide a friendly API that’s easy to explore and understand, easier to use than the Selenium-RC (1.0) API, which will help to make your tests easier to read and maintain.

It’s not tied to any particular test framework, so it can be used equally well in a unit testing or from a plain old “main” method.
Testers with only manual testing experience might have questions about this definition.

What is a framework?

What is an API?

How does Selenium-RC works?

What is unit testing?

Too many questions instead of an answer.




Is there an easier way of understanding what WebDriver test automation is? 

Can test automation with Selenium WebDriver be explained in very simple terms so that everyone can understand it, even without having any technical knowledge?

An easy way of explaining how a new thing works is through an analogy with something else that you already know.




The WebDriver name points to the analogy.

Everyone knows what a driver is and what it does.

Many people drive a car.

Those who dont drive a car use the services of taxi drivers.



Who participates in taxi driving?

3 actors are involved: 

  • the customer
  • the taxi driver
  • the car
What happens while driving a taxi?

Dialogues between the 3 actors involved.



So this is the analogy to use to explain test automation with WebDriver.

Test automation with WebDriver is like driving a taxi.

It happens through dialogues between the 3 actors involved.



Lets have a closer look at taxi driving.

A customer gets into a cab.

He gives instructions to the taxi driver about 
  • the address and 
  • the route to take

The cab driver drives the taxi, the car in this case.

While driving the taxi, the driver gives commands to the car using the wheel, pedals, etc.



The driver receives information about the cab’s status on the meters and makes decisions based on it.

The car executes the taxi driver commands to get to the desired address.




How does this help with understanding test automation?

Let's ask about test automation the same questions asked for driving a taxi.


Who participates in test automation?

There are 3 actors in test automation with WebDriver:
  • tester that writes the automation code
  • browser driver
  • browser
What happens during test automation?

Dialogue between the 3 actors involved.
How do the analogy between taxi driving and web driver test automation work?

Let's see:

A test engineer is like a taxi customer.

The test automation code is like the customer instructions to the taxi driver.

The browser driver object is like the taxi driver.

The browser is like a car.




Does it start making sense?

Taxi driving versus test automation?



Let's have a closer look at test automation.

The test engineer writes code with instructions for the browser driver object.

He tells the browser driver object to 
  • open the site and 
  • interact with the site elements.

The browser driver drives the browser.

It does this by sending commands to the browser.
The browser driver receives information from the browser about 
  • status of site elements (are they visible, are they enabled)
  • values of site elements 
and makes decisions based on it.

The browser executes the commands received from the browser driver.



Is the analogy clear now?




Share this

14 Responses to "WebDriver test automation is like driving a taxi"

  1. Great information about Web drever automation. It will be helpful for us... QTP online training
    Thank you !!

    ReplyDelete
  2. Nice analogy. Remember to describe where the analogy differs. For example taking a taxi costs money and it needs to be ordered. Also how do I bring extra bagage? :-)

    ReplyDelete
  3. The analogy is quite understandable, however the title... I believe there is a problem with the implicit perspective in the tile. I really think it would be better to say "Web Driver test automation is like riding a taxi" - this will describe what you explained from the point of view of the tester.

    ReplyDelete
  4. Excellent & helpfull logic....

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. I found my private lessons to be instrumental in my training, and would highly recommend this Port Macquarie Driving School. I may even call them for a brush up once I'm in the vehicle I'm buying.

    ReplyDelete
  7. Nicely explained. I think in one of the diagram. Browser driver is shown in place of car which is wrong

    it should be browser because car = browser I am talking about circular diagram.

    It would be great if in the end of the article if you would have drawn the actual web driver architecture

    ReplyDelete
  8. Very nice explanation. Do provide more of these.

    ReplyDelete