Cucumber Capybara Test Automation
Cucumber Capybara Test Automation
In this blog I hope to give an insight into the tools we are using to automate testing at
GameSparks.
However I think we should first address why we are using automated testing.
Common Misconceptions
Automation is a Magic Bullet the initial setup and step creation will take time and effort. It
will also require effort to maintain. This needs to be factored into any planning or estimation.
Everything Should Be Automated Not everything is suitable for automation. If you have a
test that takes 30 seconds to perform but a week to automate it isnt worth automating. Also
some things such as the look and feel of the UI cannot be easily automated and will require a
manual check.
Automation Replaces Manual Testing Automation will never replace manual testing.
Automation is very good for regression but it cannot replace the insight, experience and
Tools
Cucumber
http://cukes.info
Cucumber is a tool that executes plain-text functional descriptions as automated tests. The
language that Cucumber understands is called Gherkin. Cucumber itself is written in Ruby,
but it can be used to test code written in Ruby or other languages including but not limited
to Java, C# and Python
As you can see it is very easy to understand what the test is trying to acomplish.
Capybara
http://jnicklas.github.io/capybara/
Capybara is a library written in the Ruby programming language which makes it easy to
simulate how a user interacts with your application. Capybara can talk with many different
drivers which execute your tests through the same clean and simple interface. You can
seamlessly choose between Selenium, Webkit or pure Ruby drivers
Ruby
https://www.ruby-lang.org
Ruby is an open source programming language with a focus on simplicity
For those not familiar with Ruby the following links may be of use: