CSC/ECE 517 Fall 2021 - E2170. Testing - Response Maps: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 14: Line 14:
* response_map.rb <----------------- 74.47% coverage
* response_map.rb <----------------- 74.47% coverage


This project aims to get all the response maps to at least a 90% level of coverage for every Response Map file.
This project aims to get all the response maps to at least a 90% level of coverage for every Response Map file by writing unit tests for each uncovered method listed in the next section.


== Team ==
== Team ==

Revision as of 19:10, 8 November 2021

Description about project

This page is a description of Expertiza OSS project E2170 which aims to adequately test several files regarding the ResponseMap model. Here is a description of what response maps do:

  • In Expertiza, response maps establish a relationship between a reviewer, a reviewee, and an object to be reviewed. The reviewer is an assignment_participant, the reviewee is an assignment_team, and the reviewed object is either an assignment or another response_map. Each (reviewer, reviewee) pair will have a separate response map. Every time a new review is performed (e.g, every round), a new Response object is created whose map_id is that response map.

The breakdown of the ResponseMap model can be found here. There are several types of ResponseMaps that extend functionality of the original ResponseMap. None of which including the superclass are adequately tested. These files include:

  • review_response_map.rb <--------- 92.5% coverage
  • metareview_response_map.rb <------ 23.08% coverage
  • teammate_review_response_map.rb <- no coverage
  • response_map.rb <----------------- 74.47% coverage

This project aims to get all the response maps to at least a 90% level of coverage for every Response Map file by writing unit tests for each uncovered method listed in the next section.

Team

  • Connor Smith (cpsmith6)
  • Abir Majumder (aamajumd)
  • Quinn Dibble (qdibble)
  • Alex Carruth (agcarrut)

Test Files Involved

There are 4 test files involved in this project:

  • review_response_map_spec.rb
  • metareview_response_map_spec.rb
  • teammate_review_response_map_spec.rb
  • response_map_spec.rb

of these files, only review_response_map_spec.rb currently exists; the rest will be added.

Description of modifications/additions

review_response_map_spec.rb

Currently this file is 92.5% covered and there are no plans to cover it further.

metareview_response_map_spec.rb

The functions for metareview_response_map.rb that will be tested are:

  • get_all_versions
  • contributor
  • questionnaire
  • get_title
  • export
  • export_fields
  • import
  • email

teammate_review_response_map_spec.rb

The functions for teammate_review_response_map.rb that will be tested are:

questionnaire

This function searches for a TeammateReviewQuestionnaire object and returns it.

get_title

This function returns the string "Teammate Review".

teammate_response_report

This function returns the teammate response report given the reviewer ID.

email

This function sends a notification email to a student who has been reviewed by their teammate.

response_map_spec.rb

The functions for response_map.rb that will be tested are:

  • self.assessments_for(team)
  • comparator
  • self.reviewer_assessments_for(team, reviewer)
  • metareviewed_by?

assign_metareviewer

find_team_member

Running Tests

  rspec ./spec/controllers/<test file name>