views:

34

answers:

4

Is keyword driven testing something that could be implemented using Selenium? If so, how exactly and where can I learn more about it? A simple example might help me get started :)

Thanks!

A: 

Yes. But keyword driven testing is not something particular to Selenium. Selenium is just the tool/framework for interacting with the browser UI elements in an automated fashion. Keyword driven testing frameworks are typically independent from the automation tool. Try googling keyword driven test automation frameworks to get started.

Tom E
A: 

Agree with Tom E. We use keyword driven testing for example with iMacros.

http://en.wikipedia.org/wiki/Keyword-driven_testing is a good overview and mentions frameworks.

FrankJK
+1  A: 

Using TestPlan with Selenium as a backend is a good option for such testing. I have written several scripts which load CSV files, have hand-coded tables, or use automatic generators to drive the testing.

The language in TestPlan is however clear enough that a typical non-programmer can pick it up and work with it. This further alleviates the trouble. For example, the below is a simple script to submit a form.

GotoURL http://mydomain.com/
SubmitForm with
  %Params% with
    %name% Tom
    %age% 45
  end
end

Check //p[@class='success']

That goes to a page, submits the form, and ensures that the result has a specific element (XPath is used, but there are other predicates to locate things).

edA-qa mort-ora-y
Thanks. Right now I have no idea of TestPlan but I'll try this and see.
ATester
+1  A: 

The Page Object Model is a way to represent your pages using Selenium 1 or 2/webdriver that might be of interest to you. With proper setup your tests become human readable and within an IDE that supports code completion, simple to write.

I know this isn't quite what you are asking for, but it provides excellent abstraction and makes tests readable and powerful. You can mock your test flow with somewhat plain language and then fill it in later.

dhackner
thanks! I got this suggestion in an answer to another question, so already started applying it.
ATester