CSC/ECE 517 Fall 2021 - E2133. Write tests for popup controller.rb

From Expertiza_Wiki
Revision as of 16:10, 18 October 2021 by Snparab (talk | contribs) (Created page with "== Project Introduction == The PopupController is responsible for preparing data that will be displayed in popup views. To render the data, which mostly concerns assignments,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Project Introduction

The PopupController is responsible for preparing data that will be displayed in popup views. To render the data, which mostly concerns assignments, the controller makes many accesses to database tables such as Response, ResponseMap, Question, Questionnaire, Answer, and Participant.

Team

  • Sayali Parab, snparab1704
  • Rageeni
  • Priya

Files Involved

popup_controller.rb

popup_controller_spec.rb

Running Tests

What we need to do is to set up the environment and complete the 'popup_controller_spec.rb' to finish the integration tests for popup controller. This rspec test file can be run by calling the following code:

  rspec spec/controllers/popup_controller_spec.rb

What needs to be done

1.Write RSpec integration tests to make the statement coverage above 90%.

2.Cover as many edge cases as you can.

3.Achieve as high branch coverage as you can. Teaching staff will use the mutant-rspec gem to measure test thoroughness and fault-finding capability of tests.


Test Plan

Popup Controller Methods

The code of the controller can be found here. The methods are:

  • action_allowed?
  • author_feedback_popup
  • team_users_popup
  • view_review_scores_popup
  • reviewer_details_popup
  • self_review_popup


Related Links

The main repository can be found here

The forked git repository for this project can be found here

Conclusion