Create a project and do testing using cucumber.
Project name “product”
Requirement
The user can see the available products.
When the user come to the page he should be able to see all the available products with description like
Title: Ruby on Rails
Description: Model, view, controller architecture
Image Url: ror.jpg
Price: 21
He should be able to add new products.
He should be able to show the products.
He should be able to edit products.
He should be able to validate products details when adding new products.
Error massages should be display when there is a wrong with adding data like
Price should be number
Title cant be blank etc.
When Edit product the validation also should be done.
He should be able to navigate any places by clicking links.
He should be able to delete products.
Product table contents
Title = String
Description = String
Image Url = String
Price = Decimal
Lets start developing the project.
Install cucumber
sudo gem1.8 install cucumber
The plugins’ dependencies must be installed separately:
gem install term-ansicolor treetop diff-lcs nokogiri
Lets start developing our project
Open a terminal then type
rails -d mysql product
cd product
rake db:create:all
rake db:migrate
Now lets try to create cucumber
ruby script/generate cucumber
Then run
Cucumber features
Now you are ready to work with cucumber
lets see that in next post.