Whatâs hot in Testing Technology right now? Ruby & Cucumberâ¦ sounds like an exotic salad combination right?Â Not quiteâ¦ Cucumber is a BDD (Behaviour Driven Development) testing tool and framework. This means its software development process is based on Test Driven Development (TDD).Â Â Cucumber itself is written in Ruby but it can be used to âtestâ code written in other languages including Java, C# and Python.Â
Cucumber is fast becoming the standard for acceptance testing.Â With the use of Cucumber, the user describes the behaviour of the system with natural languages with some specific keywords.Â The step definitions are written in Ruby.Â This gives a great deal of flexibility on how the test steps are executed.Â It can also be combined with web automation framework to implement browser based web automation tests.
Just when you think you know everything about Cucumber, Gherkin is the language that Cucumber understands (technically speaking a small computer language).Â It is a business readable, domain specific language that describes softwareâs behaviour without detailing how that behaviour is implemented.Â Gherkin serves two purposes â documentation and automated testing The challenge with writing good automated acceptance tests is for them to be really effective, they need to be readable by not only the computer but also by the stakeholders.Â Â Gherkin gives a lightweight structure for documenting examples of the behaviour required by the stakeholders, in a way that it can be easily understood both by the stakeholders and by Cucumber.Â Although Gherkin is called a programming language, its primary design goal is human readability, meaning it can be written in automated tests that read like documentation.
Stay tuned for my next blog; Cucumber verses Steakâ¦.