Tuesday, October 15, 2013

BDD and Acceptance Testing with Rspec and Capybara

BDD helps us to figure out
1)What to test. - Use cases or User Stories. Test what something does(behavior) rather than what something is (structure)
2)Where to start. - From the outermost layer.
3)What to ignore.- Ignore the stuff in the middle.

-Notes
 -Proper acceptance test treat your application as a black box. Which means that they should have no knowledge of your application.
 - Capybara is a browser automation library.
- helps you test web applications by stimulating how  areal user would interact with your app.
 - It is agnostic about the driver running your tests and comes with Rack::Test and Selenium support built in.
- Rack::Test run requests against your app, then provides the resulting HRML to capybara and rspec examination.

-When testing
 Remember order for the db commands:

rake db:reset
rake db:migrate
rake db:test:prepare
rake db:populate

2 comments:

  1. Hello Anubhav,
    The Article on BDD and Acceptance Testing, gives amazing information about it. Thanks for Sharing the information about the features of Acceptance Test, For More information check the detail on the User Acceptance Testing here Mobile App Testing

    ReplyDelete
  2. The Article on Mobile testing Services is awesome nice description, thanks for sharing the information about it.Mobile app testing Services and load testing services.

    ReplyDelete