A need was felt for a tool that could create and
run automated acceptance tests that were developed in so called BDD or behavior
driven development style. Thus, cucumber testing tool came in to existence.
About Cucumber Testing Tool
- The
software for this tool has been developed in ruby programming language.
- However, the cucumber testing tool does work for the projects beyond the ruby level.
- For
some ruby, cucumber testing tool is like a bridge to go to the target language.
- For other, gherkin parser still continues to be relevant while they use the
target language for the implementation purpose.
- There are certain feature
documentations that are created in business – facing text and these can also be
executed with the help of cucumber testing tool.
- Features might be defined
using one or more than one scenarios.
- These are executed using the ruby
definition of the test implicit comprising of few steps.
- For the ruby tool box, the cucumber testing tool proved to be the most popular testing frame work in
the month of January 2012.
- The leading frame work was RSpec.
- In the same year
in the month of April, the cucumber testing tool was moved to a category of the
acceptance test frameworks.
- A survey was carried out which revealed that
cucumber testing tool stands 5th in the ranking of the popular
testing frameworks being used by the startup companies.
- Cucumber is just an
implementation of the behavior driven development based up on ruby.
- Using it, the user can describe how the system behaves with some natural language comprising
of some specific keywords.
- Firstly, a feature file is created explaining a
feature of the software system or application as well as certain scenarios
pertaining to a number of different test situations.
- Secondly, step definitions
are written in ruby programming language that explains the purpose of that
particular step.
- Writing those definitions in ruby language provides
flexibility in the execution of the test cases.
- The testing tool comes with
definitions for an acceptance testing tool called webrat.
- This tool can be used
for simulation of the browser not having javascript support.
- It also provides
option for making a combination with water that is a web automation frame work
and is used for implementing the web automation tests based up on web browser.
- Using
cucumber, with this combination counts as a traditional way of using it but
anyways it works quite well.
- In testing using cucumber, a feature is tested
against a number of test scenarios that might describe several operations.
- The step definitions part needs to be
explained so that the tool knows what it has to do next.
- In some of the cases, water is used with water – web driver gem and Rspec gem.
- Constants can be
defined as a reference to the browser and for web.
- Hash PAGES is not required
in every case but proves to be beneficial when there are a number of pages
involved.
- The tests thus developed can be executed either when the full web
site is ready or during the implementation phase itself.
- Even if you decide to
go with the second option, you will have to run the test one more time when the
next release goes out.
- You have a third option i.e., for using the test as a
stand – alone set for the web site.
- Another plus point of the cucumber testing
tool is that it displays in quite a formatted way that displays steps that were
both successful and failure.
- Green color is used for displaying successful
steps and red is used for the failed ones.
- All that has been described for the
cucumber implies for the water web testing frame work also.
No comments:
Post a Comment