際際滷

際際滷Share a Scribd company logo
Automated Testing
with Rails
Testing Saves Your...
Why?
 We're Human...
 Think about Your Code
 Regression Tests
 Manual Testing... bleh
 Save Time
 Happy Customers!
Test Driven Development
(TDD)
Behavior Driven Development
(BDD)
 TDD
 Built into Rails
 Specific Details of Failure
 Assert - Evaluates the argument passed is True
Note: In Rails 4, Test::Unit has been superseded by MiniTest. MiniTest is
included in the Ruby Standard library.
Example
Test::Unit
 BDD
 Gem
 Language is Easy to Understand
o Domain Specific Language (DSL)
o Developers and Customers Understand the Tests
 spec directory
Describes the behavior of the fixture (Bacon).
Example
RSpec
 BDD
 Gem
 http://cukes.info/
 DSL
 Reads like Acceptance Criteria
Example
Cucumber
 BDD
 Gem
 Web Simulator
 Support Selenium WebDriver
Example
Capybara
Questions?

More Related Content

Automated Testing with rails

  • 2. Testing Saves Your... Why? We're Human... Think about Your Code Regression Tests Manual Testing... bleh Save Time Happy Customers! Test Driven Development (TDD) Behavior Driven Development (BDD)
  • 3. TDD Built into Rails Specific Details of Failure Assert - Evaluates the argument passed is True Note: In Rails 4, Test::Unit has been superseded by MiniTest. MiniTest is included in the Ruby Standard library. Example Test::Unit
  • 4. BDD Gem Language is Easy to Understand o Domain Specific Language (DSL) o Developers and Customers Understand the Tests spec directory Describes the behavior of the fixture (Bacon). Example RSpec
  • 5. BDD Gem http://cukes.info/ DSL Reads like Acceptance Criteria Example Cucumber
  • 6. BDD Gem Web Simulator Support Selenium WebDriver Example Capybara