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

From Expertiza_Wiki
Revision as of 20:50, 5 November 2015 by Hma5 (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

Based on the project requirements, testing can be divided into the following parts:

T1. Ensure an instructor is able to login to the system.

T2. Ensure an instuctor is able to create a course.

T3. Ensure that the score of a certain assignment can be viewed.

T4. Ensure to view the score of a review.

T5. Ensure to view the score of an author feedback.

T6. Ensure to create an assignment which has two rounds of review, has a topic or does not has a topic, and has a staggered-deadline.

References

<references></references>