https://de.wikipedia.org/w/api.php?action=feedcontributions&feedformat=atom&user=Angry+PythonWikipedia - Benutzerbeiträge [de]2025-07-16T23:49:10ZBenutzerbeiträgeMediaWiki 1.45.0-wmf.9https://de.wikipedia.org/w/index.php?title=Cucumber_(Software)&diff=118068288Cucumber (Software)2011-10-17T10:35:26Z<p>Angry Python: rv replacement of referenced text by Mattwynne (talk)</p>
<hr />
<div>{{ref improve|date=September 2011}}<br />
{{unreliable sources|date=September 2011}}<br />
{{Infobox Software |<br />
name = Cucumber |<br />
logo = |<br />
screenshot = |<br />
caption = |<br />
developer = [[Aslak Hellesøy]]<ref name="AslakHellesoy">http://aslakhellesoy.com/</ref>, [[Joseph Wilk]]<ref name="JosephWilk">http://blog.josephwilk.net/</ref>, [[Matt Wynne]]<ref name="MattWynne">http://blog.mattwynne.net/</ref>, [[Gregory Hnatiuk]]<ref name="GregoryHnatiuk">https://github.com/ghnatiuk</ref>, [[Mike Sassak]]<ref name="MikeSassak">https://github.com/msassak</ref><br />
|<br />
latest_release_version = 1.0.2 |<ref name="RubyGems">https://rubygems.org/gems/cucumber/versions/1.0.2</ref><br />
latest_release_date = July 17, 2011 |<br />
operating_system = [[Cross-platform]] |<br />
genre = [[Behavior driven development]] [[framework (computer science)|framework]] / [[Test tool]] |<br />
license = [[MIT License]] |<br />
website = [http://cukes.info/ cukes.info] |<br />
}}<br />
<br />
'''Cucumber''' is a tool for running automated [[acceptance testing|acceptance tests]] written in a [[behavior driven development]] (BDD) style. Cucumber is written in [[Ruby (programming language)|Ruby programming language]].<ref name="TheCucumberBook">http://pragprog.com/book/hwcuc/the-cucumber-book</ref><ref name="TheRSpecBook">http://pragprog.com/book/achbd/the-rspec-book</ref> Cucumber allows the execution of [[software feature|feature]] documentation written in business-facing text.<br />
<br />
==Example==<br />
<br />
A feature definition, with a single scenario<ref name="DivisionFeature">https://github.com/cucumber/cucumber/blob/master/examples/i18n/en/features/division.feature</ref>:<br />
<pre><br />
Feature: Division<br />
In order to avoid silly mistakes<br />
Cashiers must be able to calculate a fraction<br />
<br />
Scenario: Regular numbers<br />
* I have entered 3 into the calculator<br />
* I press divide<br />
* I have entered 2 into the calculator<br />
<br />
Result: Should be 1.5 on the screen<br />
</pre><br />
<br />
The execution of the test implicit in the feature definition above requires the definition, using the Ruby language, of a few "steps"<ref name="CalculatorSteps">https://github.com/cucumber/cucumber/blob/master/examples/i18n/en/features/step_definitons/calculator_steps.rb</ref>:<br />
<source lang="Ruby"><br />
# encoding: utf-8<br />
begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end <br />
require 'cucumber/formatter/unicode'<br />
$:.unshift(File.dirname(__FILE__) + '/../../lib')<br />
require 'calculator'<br />
<br />
Before do<br />
@calc = Calculator.new<br />
end<br />
<br />
After do<br />
end<br />
<br />
Given /I have entered (\d+) into the calculator/ do |n|<br />
@calc.push n.to_i<br />
end<br />
<br />
When /I press (\w+)/ do |op|<br />
@result = @calc.send op<br />
end<br />
<br />
Then /the result should be (.*) on the screen/ do |result|<br />
@result.should == result.to_f<br />
end<br />
</source><br />
<br />
==Popularity==<br />
Cucumber has been downloaded over 829,873 times<ref name="RubyGemsStats">http://rubygems.org/gems/cucumber/stats</ref>. According to a [[Mashable]] survey<ref name="MashableSurvey">http://mashable.com/2011/07/26/startup-tools/</ref>, it is the 5th most popular testing framework in use by [[Startup_company|startup]] companies.<br />
<br />
==References==<br />
{{reflist}}<br />
<br />
== External links ==<br />
*[http://cukes.info/ Cucumber project]<br />
*[https://github.com/cucumber Cucumber (GitHub profile)]<br />
*[http://rubygems.org/gems/cucumber Cucumber (Ruby Gem)]<br />
*[http://rubygems.org/gems/cucumber-rails Cucumber generators and runtime for Rails (Ruby Gem)]<br />
*[http://www.linuxjournal.com/magazine/forge-cucumber At the Forge - Cucumber], by Reuven M. Lerner in the [[Linux Journal]]<br />
*[http://agiletoolkit.libsyn.com/agile_2009_aslak_hellesoy_cucmber_test_framework Agile 2009 - Aslak Hellesoy - Cucumber test framework], podcast by Bob Payne with Aslak Hellesøy<br />
*[http://www.rubyinside.com/cucumber-the-latest-in-ruby-testing-1342.html Cucumber: The Latest in Ruby Testing], by Mike Gunderloy<br />
*[http://cuke4ninja.com/ The Secret Ninja Cucumber Scrolls], by [[Gojko_adzic|Gojko Adzic]] and David de Florinier<br />
<br />
[[Category:Software testing tools]]<br />
[[Category:Software using the MIT license]]<br />
<br />
<br />
{{programming-software-stub}}</div>Angry Python