Selenium Interview - A basic guide

One of my friend recently had to attend an interview for a company for a selenium - tester job profile. Then he asked me, what should I prepare for? Then I thought of putting together this post, as selenium is now an industry accepted tool.

Simple explanations

What is Selenium  ?

- Its a web testing tool.

How it works?

It works through a proxy, using javascript to driver the tests.

What browsers does it support?

Firefox - 3.0/2.0
IE         - 7/8
Safari

What programming languages can you use to write the tests?


LanguageSelenium IDESelenium Remote ControlSelenium Core
C#Generate codeLibrary ("driver") supportn/a
JavaGenerate codeLibrary ("driver") supportn/a
PerlGenerate codeLibrary ("driver") supportn/a
PHPGenerate codeLibrary ("driver") supportn/a
PythonGenerate codeLibrary ("driver") supportn/a
RubyGenerate codeLibrary ("driver") supportn/a


Preparing for Interview

Tips :

1) Understand the basics right :

-  Basics of Web testing
-  How selenium works?  -  http://seleniumhq.org/about/how.html

2) How selenium Indentifies web element on the page?

- By Id or Name or Using an Xpath

3) Different Flavours of selenium

- Selenium Core
- Selenium RC
- Selenium Grid

4) Selenium  - How to use IDE?


5) Is IDE good enough to automate your tests?


6) What are the practical issues, while using selenium?


7) Selenium Vs Other tools (Like QTP)


8) Multi browser testing with selenium (Or Selenium Grid)



Automation Testing - Traditional to Agile

I always wonder, how the face of automation testing has changed over the years.  Automation testing has always been perceived as post development, costly activity to be done by specialists.

Agile methodology has broken all the barriers/Myths of automation testing. From a heavy weight , System level , Regression oriented  process to Acceptance oriented, all level light weight process.

In traditional projects, automation is only used as regression testing tool, and always perceived as to be done after "Stabilisation of the product"

Automation in agile projects becomes inevitable as its a mean to reduce the feedback cycle. it reduced the regression cycle, and helps producing quality code with higher pace. it also helps system to be robust all the time.

Unlike traditional project automation, which is only participated by specialist, in agile projects automation is practiced at all levels (Unit, System, Integration) by all stake holders of the project in one form or another. 

In Agile methodology,  automation tests are treated and take care as part of the overall source code. It needs the same love and care as any other piece of code in the project.

Automation in agile project is not just about automating the test cases, but automation is any mean to convert manual process to reduce the time waste or to add value in overall process.


Testing - When, Where and How on agile projects....

I think this question haunts most of the agile QA's mind. I am going to wrote something in this post from my previous experience.

As agile is not a fixed set of processes, so its is imperative to be agile in testing as well. However, some practices help..but again everything is contextual.

1) Adding value early : Agile testing is all about giving feedback early, not necessarily only by testing the software, but in different ways as well.
  a) Looking at requirements for Clarity and Testability  - QAs really need to look at the requirement / stories upfront to figure out that requirement are  unambiguous and testable.

Unambiguous .  - I think unambiguous in agile has little different context compared to typical waterfall project.

- Requirement should be small enough to make sense in the context
- Acceptance criteria (Stories are generally broken in to acceptance criteria) should not be duplicate or overlapping from different stories.

However, doing that can be really difficult and can only be achieved with really good communication between Dev/BA/QA.

Testable : Testability aspect of the story requires QA to scan through the story to see what needs to be done to test the story. These factors can generally be.

- Finding hidden requirements
- Environment
- Test data
- Dependency on other requirement.

Getting these details early helps the story to be prioritised accordingly in the backlog, and allows smooth execution of the story in the iteration.


2) Use Automation to the advantage not for sake of doing it

Automation in agile is quiet controversial, as people try to automated everything and end up having a long feedback cycle.

Automation is meant for giving early feedback on the latest code, and automation should be limited to what is worth Automating and what is not.

Every automation test written has a cost against it. The cost can be seen as

Cost of continuously running it (Increased feedback cycle).  This cost should be compared against cost of not runing it. So, a question needs to be asked what if a test is not written? what we gonna lose, what would be the cost of fixing the stuff around the code for which we are losing the coverage?

And this might not be straight forward finding the worth of a test. Its a contextual decision and also depends on size of the project and number of people involved in it. 

Simply putting this in other words mean : 

Longer feedback cycle = More people losing time in getting instant feedback.


I will write posts on - How to write automated acceptance tests in my future posts.....

This post to be continued

 

Twist - Still waiting for GA

I am still waiting for Twist GA to continue my series on Twist features.


Till then I want to keep my mouth shut...


How much to test?

That's a question needs to be answered very early in any agile project. 

Testing costs time and money, and no doubts adds value. Then how do we get a balanced approach on testing the user stories..

These questions should be answered while writing automated test for Acceptance critera

1) Is it too low level of testing...?
  - Do I really need to check a particular link is present or not...?

2) Are there repeating tests with some diversity?

- Can it be compromised over quick turnaround of the build?

3) How do we mitigate the risk of writing less tests?

- Can we make tests precise ?
- Can we not automate unit level tests in Accpetance test.




To be continued...







Twist - Using other drivers

Twist can be used with other available drivers in Java for web .  W ehave recently tried using webdriver to migrate some of our tests and effort was painless. 


Twist allows injection of other drivers using spring. So, that means without changing the definition of the scenario the underlying code can be chaned.

Also, Selenium 2.0 is going to be webdriver primarily, so seems twist will be even powerful in coming days.