Cucumber — Overview | Code Factory
Cucumber Tutorial Index Page: Link
- A cucumber is a BDD (Behaviour Driven Development) tool Framework. Which is used to write acceptance tests for web applications.
- It allows automation of functional validation in easily readable and unsderstandable format (like plain english) to BA, Developer, Tester.
- Cucumber feature files can serve as a good documentation for all. Initially it is implemented Ruby then it is extended to Java framework.
- Behaviour Driven Development (BDD) is extension of Test Driven Development (TDD) and it is used test the system rather than testing a particular piece of code.
- Cucumber can be used along with Selenium, Ruby on Rails, Pico container, Spring Framework, etc…
- Cucumber supports Ruby, Java, Groovy, Gosu, Lua, .net, PHP, Python.
- We use Gherkin language
- — FEATURE is nothing but the main one specification
- — SCENARIO is nothing but what to test
- — GIVEN is nothing but pre-condition
- — WHEN is nothing but what to test the application
- — THEN is nothing but finally what is our output
- Merge specifications and Test documentation.
Why Cucumber/Advantage of Cucumber:
- Cucumber will match specification and test documents into one cohesive whole.
- Business and IT don’t always understand eachother. Cucumber executable specifications encourage collabration helping teams keep the business goal in mind at all times.
- Because they are automatically tested by cucumber, your specifications are always bang uo-to-date.
- It is acts as bridge b/w business and technical language. We can accomplish this by creating test cases in plain english text.
- It allows the test scripts to be written w/o knowledge of any code, it allows the involvement of non-programmers as well.