开发者

Selenium Keyword Driven Testing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. 开发者_如何学Go

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

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!


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.


U can look into "robotframework". The documentation also available in the wikipage.

It promises to replace the code to keyword.

http://code.google.com/p/robotframework/


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.


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).


Open2Test is like add-on style keyword driven framework. It aims to replace from writing test code to keyword. But... I'm not sure anybody really using it. There are too little info on the web.

http://www.open2test.org/index.html


Take a look at Test Automation Framework which comes with plug-n-play Keyword driven model.

http://menonvarun.github.io/taf/index.html

http://menonvarun.github.io/taf/pages/keyword_model_in_taf.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜