CSC/ECE 517 Fall 2015 E1582 Create integration tests for the instructor interface using capybara and rspec

From Expertiza_Wiki
Revision as of 20:49, 5 November 2015 by Zwu13 (talk | contribs)
Jump to navigation Jump to search

Intro

RSpec

Capybara

Capybara is a web-based automation test tool that simulates a real user to follow the scenarios of user stories.<ref>Capybara on GitHub</ref> It could interact with app to receive pages, parse the HTML and submit forms as a user would.<ref>Introducing cucumber & capybara on YouTube</ref> Used with RSpec and Ruby on Rails (version 1.9 or later), capybara makes it easier to write integration tests. <ref>Using Capybara in Rails 3</ref> It is used on the top of an underlying web-based driver and offers a user-friendly DSL (Domain Specific Language) to describe actions executed by the underlying web driver. Such as rack::test, selenium-webdriver and capybara-webkit.<ref>The Basics of Capybara and Improving Your Tests</ref>

In this project, we use capybara with rspec by adding the following line:

 require 'capybara/rspec'

Then put capybara specs in spec/features.

Integration test

Testing

References

<references></references>