CSC/ECE 517 Fall 2017/E1754 Feature test of rubric advice

From Expertiza_Wiki
Revision as of 18:13, 27 October 2017 by Ryshukla (talk | contribs)
Jump to navigation Jump to search

Introduction

Expertiza is a web application which provides a dashboard to the students where they can submit and peer-review assignments, projects, codes, and other such objects. It allows students to review each other’s work and improve their work upon this feedback. Rubric advice allows reviewers to see what characteristics of work merit a particular score.


The problem statement

Rubric advice lets a user see what criterion or characteristics of work merit a particular score. An instructor can retrieve peer review assignments and leave some advice or give scores based on some criteria. Similarly, students can log in and retrieve the rubric advice left by the instructor. We mocked the behavior of the user (both as an instructor and student) to see how different scenarios work, like modifying, saving and retrieving advice and building feature tests for it. The testing frameworks used for the same were Selenium and Capybara.


Tasks identified

Student Side: A student, when filling a peer review should be able to see the rubric advice associated with a particular test score. We test this task through adding a test case in the peer_review_spec.rb since Peer Review is superset of the Rubric Advice feature as it is a task where a student uses the rubric advice and submit it.

Files changed: peer_review_spec.rb The test case checks if student is able to select a rubric advice that the instructor has created and then submit it.

  it "able to view and use rubric advice", :js => true do
    load_questionnaire
    expect(page).to have_content "Show advice"
    page.find('#showAdivce_1').click
    expect(page).to have_content "5 - Good"
    page.find("a", :text => "5 - Good").click
    click_button "Save Review"
    expect(page).to have_content "Your response was successfully saved."
  end

The existing code given creates the required environment for the test student. It sets up a team, assignment and other required elements for the test student to submit a review.

before(:each) do
    create(:assignment, name: "TestAssignment", directory_path: 'test_assignment')
    create_list(:participant, 3)
    create(:assignment_node)
    create(:deadline_type, name: "submission")
    create(:deadline_type, name: "review")
    create(:deadline_type, name: "metareview")
    create(:deadline_type, name: "drop_topic")
    create(:deadline_type, name: "signup")
    create(:deadline_type, name: "team_formation")
    create(:deadline_right)
    create(:deadline_right, name: 'Late')
    create(:deadline_right, name: 'OK')
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: Time.now.in_time_zone + 1.day)
    create(:topic)
    create(:topic, topic_name: "TestReview")
    create(:team_user, user: User.where(role_id: 2).first)
    create(:team_user, user: User.where(role_id: 2).second)
    create(:assignment_team)
    create(:team_user, user: User.where(role_id: 2).third, team: AssignmentTeam.second)
    create(:signed_up_team)
    create(:signed_up_team, team_id: 2, topic: SignUpTopic.second)
    create(:assignment_questionnaire)
    create(:question)
    create(:question_advices)
   end

The rubric advice is prepared in factory.rb with the following code addition . This allows our test Student to get a ready rubric advice that he can choose.

  factory :question_advices, class: QuestionAdvice do
    question_id 1
    score 5
    advice "Good work"
  end


Instructor side:

Edit a certain review rubric, and add advice to it. Test that when advice is added for a particular criterion, the advice can be retrieved and that it is exactly the advice that was added.


Testing Intructions

Student Side

  • Login to Expertiza using following credentials:
         Instructor user