开发者

For an existing rails application, which is better? building integration tests through cucumber or through selenium

For an existing ra开发者_C百科ils application, which is better? building integration tests through cucumber or through selenium


The two tools serve two different purposes, so you can use them together.

Cucumber is a BDD framework which allows you to phrase scenarios in English then automate them by tying the steps - phrased as Given, When, Then - to matching steps in code.

Those steps can then be used to automate a scenario using the automation tool of your choice. Selenium is an automation tool for web pages, so you could use that if your application is web based.


  > which is better?

seleinum focuses on testing existing aplictions. A selenium test is easier to create and may be more difficult to maintain if the gui changes or after renaming items.

cucumber is better for agile/testdriven projects where tests and expected behavior is defined before implementation. cucumber is great for describing new features, that may not exist yet. A customer can see how far the implementation has gone.

Conclusion:

For testdriven/agile development cucumber is better.

For traditional waterfall-style development where tests are written after implementation selenium is better

since you have an existing aplication selenium is the answer to your question


Which one do you know better? Choose that one.

If you don't have any idea, maybe browsing the cucumber site will be of some use? https://github.com/aslakhellesoy/cucumber/wiki/Setting-up-Selenium

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜