Skip to content

Instantly share code, notes, and snippets.

@prashanth-sams
Last active September 4, 2019 13:14
Show Gist options
  • Save prashanth-sams/2947bea56fcbe8d2269a09d2fe7e51bb to your computer and use it in GitHub Desktop.
Save prashanth-sams/2947bea56fcbe8d2269a09d2fe7e51bb to your computer and use it in GitHub Desktop.
cucumber vs capybara
|-------------------------------|-------------------------------|
|      Cucumber                 |     Capybara                  |
|-------------------------------|-------------------------------|
| Must be customized to support | Page-object-pattern support   |
| page-object-pattern           | using a 3rd party gem called  |
|                               | 'site-prism' which is on top  |
|                               | of Capybara                   |
|-------------------------------|-------------------------------|
| Test cases are more readable  | Test cases are not readable;  |
| and written in plain english  | Capybara also wraps RSpec and |
| text as a DSL                 | you follow the same pattern to|
|                               | write test cases              |
|-------------------------------|-------------------------------|
| No support to test page       | Friendly support to test      |
| section                       | sections of the page using    |
| section                       | site-prism                    |
|-------------------------------|-------------------------------|
| Easy to iterate data using    | Not easy to iterate data      |
| tables                        |                               |
|-------------------------------|-------------------------------|
| Cucumber has its own runner   | Uses RSpec runner to execute  |
|                               | tests                         |
|-------------------------------|-------------------------------|
| Default HTML reporter         | No default HTML reporter      |
|-------------------------------|-------------------------------|
| Need to learn cucumber regex  | No such concept               |
| pattern to write step-        |                               |
| definition which is the middle|                               |
| man for test case and script  |                               |
|-------------------------------|-------------------------------|
| You can use the native        | (Wrapper)/Built on top of     |
| selenium-webdriver methods    | selenium-webdriver ruby       |
| while using Cucumber; Cucumber| library                       |
| is just an additional         |                               |
| framework to your generic     |                               |
| automation framework          |                               |
|-------------------------------|-------------------------------|
| Pure BDD framework (In theory | Traditional functional test   |
| BDD sounds great. In practice,| model for end-to-end testing  |
| product owners and developers |                               |
| rarely continue to use BDD)   |                               |
|-------------------------------|-------------------------------|
| Trending in automation world  | Very hot in market as it own  |
|                               | a framework pattern in        |
|                               | alliance with site-prism      |
|-------------------------------|-------------------------------|
```
|-------------------------------|-------------------------------|
| Cucumber | Capybara |
|-------------------------------|-------------------------------|
| Test cases are more readable | Test cases are not readable; |
| and written in plain english | Capybara also wraps RSpec and |
| text as a DSL | you follow the same pattern to|
| | write test cases |
|-------------------------------|-------------------------------|
| Easy to iterate data using | Not easy to iterate data |
| tables | |
|-------------------------------|-------------------------------|
| Cucumber has its own runner | Uses RSpec runner to execute |
| | tests |
|-------------------------------|-------------------------------|
| Default HTML reporter | No default HTML reporter |
|-------------------------------|-------------------------------|
| Need to learn cucumber regex | No such concept |
| pattern to write step- | |
| definition which is the middle| |
| man for test case and script. | |
| Btw, the regex pattern is not | |
| essential for all cases. | |
|-------------------------------|-------------------------------|
| You can use the native | (Wrapper)/Built on top of |
| selenium-webdriver methods | selenium-webdriver ruby |
| while using Cucumber; Cucumber| library when used with |
| is just an additional | selenium; it can also be used |
| framework to your generic | with two other drivers. |
| automation framework | |
|-------------------------------|-------------------------------|
| Pure BDD framework (In theory | Traditional functional test |
| BDD sounds great. In practice,| model for end-to-end testing |
| product owners and developers | |
| rarely continue to use BDD) | |
|-------------------------------|-------------------------------|
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment