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

From Expertiza_Wiki
Revision as of 17:55, 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

  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 an environment for the student to access an assignment , review it and hence reach the point of viewing the rubric advice.

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)
    # create(:review_response_map, reviewer_id: User.where(role_id: 2).third.id)
    # create(:review_response_map, reviewer_id: User.where(role_id: 2).second.id, reviewee: AssignmentTeam.second)
    # sleep(10000)
  end

The rubric advice is prepared in factory.rb.


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 using Selenium

  • Selenium IDE is an integrated development environment for Selenium scripts which lets you record, edit, and debug tests. It's recording feature allows you to record user actions and exports them as a reusable programming scripts which can be executed later.

Testing Intructions

  • Login to Expertiza using following credentials:
         Instructor username: instructor6, password: password
         Student username: student2064, password: password