CSC/ECE 517 Spring 2013/OSS E605B
Testing - questionnaire
Members
- Jonathan Wills - jrwills2
- Chun Sing Tsui - ctsui
- Travis Folsom - twfolsom
Highlights of Project
- Added unit tests for questionnaire subclasses
- Added functional tests for questionnaire controller
- 24 total tests
- Delete test was failing due to a potential bug in the questionnaire controller
Summary of Project
QuestionnaireController Functional Tests
The majority of the tests implemented in this project are functional tests of the questionnaire controller. The test cases were written using the ActionController::TestCase framework provided by Rails.
Helper Methods
There are two methods that assist in setting up and running the tests:
- The setup method
- The login_user method
The setup method
def setup @controller = QuestionnaireController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @Questionnaire = questionnaires(:questionnaire5).id login_user(:admin) end
List of files changed
- test/fixtures/question_types.yml
- test/fixtures/questionnaires.yml
- test/fixtures/questions.yml
- test/functional/questionnaire_controller_test.rb
- test/unit/author_feedback_questionnaire_test.rb
- test/unit/metareview_questionnaire_test.rb
- test/unit/review_questionnaire_test.rb
- test/unit/teammate_review_questionnaire_test.rb