CSC/ECE 517 Fall 2015 E1591 Integration testing for peer review

From Expertiza_Wiki
Jump to navigation Jump to search

Background

Expertiza<ref>Expertiza's Github Site</ref> is an open-source web tool that is used for online assignment completion purpose for different courses. The software enables the students to form online teams and choose different assignment topics. Each topic has a completion deadline and the students can submit the links to their work or assignments through expertiza.

One of the key features of expertiza is the online peer review process. Students who are enrolled in the same courses can review the works or the assignments of the fellow students. Typically for each assignment there is a link called "Other’s Work" where a student is prompted to give feedback to the works of their fellow classmates. This link becomes active after a certain date that is determined by the instructor or the administrator. After the date, a student can choose one of the assignments that are available for review through the activated link.

After an assignment has been chosen for review, the reviewer will be presented with a review sheet that has a number of parameters based upon which the review should be done. The reviewer chooses a rating for each parameter, typically being the lowest and 5 as the highest. He can also leave a comment justifying his rating and stating the scopes of improvements for the project. The team members whose assignment has been reviewed can also review the review, i.e. provide an explanation about their work or give comments with respect to the feedback provided by the reviewer.

For some assignments there is a scope for a re submission of an improved version of the work. After such a re-submission the reviewer can again review the assignment editing and updating his previous review based upon the resubmitted work.

Purpose

The purpose of the project is to perform an integration testing for the peer review of a submitted assignment. We aim to write test cases that test the different positive test scenarios for which the reviewer should be able to successfully submit the review to an assignment. The review process has certain minimum guidelines which need to be adhered to. We also plan to test the negative scenarios for which the reviewer doesn’t adhere to these guidelines and hence should not be able to submit the review to the assignment. The Expertiza project has been developed using Ruby on Rails. The technologies to be used for the project are RSpec<ref>Rspec.Rspec Documentation</ref> and Capybara<ref>capybara</ref> using Ruby on Rails as an underlying framework. We will write the spec methods using RSpec. The various entities like users, assignment, questionnaire and instructor will be simulated using Capybara.

Technologies to be used

RSpec

Rspec is Behavior Driven Development<ref>Behavior Driven Development</ref> framework for ruby, it is a meta gem composed of different libraries designed to work together or with other testing tools like Cucumber<ref>Cucumber</ref>. It has dependencies on Rspec core, Rspec expectations, Rspec mocks gems which can be loaded by using 'require'.

Installation-

 gem install rspec

Capybara

Capybara<ref>Capybara github link</ref> is a library written in ruby, it helps you to test your web applications by pretending to be a user and following the user story, it simulates the browser to interact with app to receive pages parse the HTML and submit forms just as an actual user would do. Capybara can interact with many different drivers which execute tests through the same clean and simple interface. One can choose between Selenium, Webkit or pure Ruby drivers.

Installation-

Capybara requires ruby 1.9.3 or later,to install add following line to your gem file and run bundle install

gem 'capybara'

If testing a rails app add this to your test helper file

require 'capybara/rails'

Integration Testing

Integration testing is a phase of software testing where units which have already been tested are combined into a component and the interface between them is tested<ref>Integration Testing - Microsoft Developer Network</ref>. The idea is to test combination of pieces and eventually expand the process to test the modules with those of the other group. Eventually, all the modules making up a process are tested together. Integration testing identifies the problem that occurs when units are combined. Some different types of integration testing are big bang, top- down, bottom-up<ref>Integration Testing - Wikipedia</ref>.

  • Big Bang Integration Testing – All modules are integrated simultaneously, after which everything is tested as a whole. It is very effective for saving time in the integration testing process.
  • The top down approach – The highest level modules are tested first. This allows high level logic and data flow to be integrated early in the process.
  • The bottom up approach - In this approach, lowest level components are tested first, and then used to facilitate the testing of higher level components.

Test Pattern and Approach

We are required to write integration tests for the peer review process. Since we are not adding any new functionalities or amending any existing ones we don’t need to follow any specific design pattern. However we need to follow a specific integration testing approach to conduct the integration testing. The testing approach that we have decided to follow is Top-Down. We are first going to create the following entities

  • User or Reviewer
  • Assignment Questionnaire or Rubric
  • Assignment

Then we plan to incrementally test the interaction of these entities in a bottom-up manner. We first test whether the user is able to successfully login. If he is able to successfully login, we test whether he is able to successfully select an assignment for review. If he is able to successfully select an assignment, we test whether he is able to able to submit a review successfully based on whether it is a text-based, point-based or both and whether he chooses to answer all, some or none of the questions of the rubric.

Flowchart for the Peer Review Testing Approach

Use Case Diagram

Test Plan

The following section describes how we plan on testing the application based requirements found on the Project Description<ref>Project Description</ref>. We wish to create Integration tests that thoroughly test a Student user reviewing an assignment submission. We will create a file called spec/features/peer_review.rb to run our integration tests.

Test Cases Prerequisites

To create and run our test cases we require some setup in Expertiza. The following list describes the information that we will enter into the system before running any of our test cases.

  1. We will use the Student with the username 'student13' and password 'password' to login as a Student.
  2. We will enroll Student into a specific course.
  3. We will create an Assignment per individual test case that is customized for our test case.
  4. We will submit an Assignment from a student other than 'student13' for 'student13' to review

Test Cases

The following list describes the individual test cases we will creating for Expertiza.

T1: Login as a Student user and select a submission for review. The submission will only contain points based review choices. The user will successfully submit the review answering the points based review choices.

T2: Login as a Student user and select a submission for review. The submission will only contain points based review choices. The user will unsuccessfully submit the review by only answering some of the points based review choices.

T3: Login as a Student user and select a submission for review. The submission will only contain points based review choices. The user will unsuccessfully submit the review by answering none of the points based review choices.

T4: Login as a Student user and select a submission for review. The submission will only contain text based review choices. The user will successfully submit the review answering the text based review choices.

T5: Login as a Student user and select a submission for review. The submission will only contain text based review choices. The user will unsuccessfully submit the review by only answering some of the text based review choices.

T6: Login as a Student user and select a submission for review. The submission will only contain text based review choices. The user will unsuccessfully submit the review by answering none of the text based review choices.

T7: Login as a Student user and select a submission for review. The submission will only contain text based review choices. The user will submit the review by answering all of the text based review choices with single word answers.

T8: Login as a Student user and select a submission for review. The submission will only contain both points based and text based review choices. The user will successfully submit the review answering all of the review choices.

T9: Login as a Student user and select a submission for review. The submission will only contain both points based and text based review choices. The user will unsuccessfully submit the review answering only some of the review choices.

T10: Login as a Student user and select a submission for review. The submission will only contain both points based and text based review choices. The user will unsuccessfully submit the review answering none of the review choices.

Scenarios Tested

Six major scenarios were tested. They are as follows:

T1: Successfully submitting a review by filling in both points and comments.

This scenario tests if a student can successfully submit a review by filling in comments in a text box and selecting a value from the drop down list.
The detailed steps are as follows:

   1. Login as a student
   2. Select the test assignment for review
   3. Click on link "Others Work"
   4. Click on button "Request a new submission to Review"
   5. Click on the link "Begin"
   6. Fill in the text box with comment "Hello World".
   7. Select the value 5 from drop down list.
   8. Click on the button "Submit Review".
   9. "Your response was successfully saved" should be displayed.

T2: Successfully submitting a review by filling in multi word comments.=

This scenario tests if a student can successfully submit a review by filling in multi word comments in a text box .
The detailed steps are as follows:

   1. Login as a student
   2. Select the test assignment for review
   3. Click on link "Others Work"
   4. Click on button "Request a new submission to Review"
   5. Click on the link "Begin"
   6. Fill in the text box with comment "Excellent Work".
   7. Click on the button "Submit Review".
   8. "Your response was successfully saved" should be displayed.

T3: Successfully submitting a review by filling a single comment with single word.

This scenario tests if a student can successfully submit a review by filling in single comment with single word in a text box.
The detailed steps are as follows:

   1. Login as a student
   2. Select the test assignment for review
   3. Click on link "Others Work"
   4. Click on button "Request a new submission to Review"
   5. Click on the link "Begin"
   6. Fill in the text box with comment "Excellent".
   7. Click on the button "Submit Review".
   8. "Your response was successfully saved" should be displayed.

T4: Successfully submitting a review by filling in only points.

This scenario tests if a student can successfully submit a review by selecting a value from the drop down list.
The detailed steps are as follows:

   1. Login as a student
   2. Select the test assignment for review
   3. Click on link "Others Work"
   4. Click on button "Request a new submission to Review"
   5. Click on the link "Begin"
   6. Select the value 5 from drop down list.
   7. Click on the button "Submit Review".
   8. "Your response was successfully saved" should be displayed.

T5: Successfully submitting an empty review.

This scenario tests if a student can successfully submit an empty review.
The detailed steps are as follows:

   1. Login as a student
   2. Select the test assignment for review
   3. Click on link "Others Work"
   4. Click on button "Request a new submission to Review"
   5. Click on the link "Begin"
   6. Click on the button "Submit Review".
   7. "Your response was successfully saved" should be displayed.

T6: Successfully submitting an empty review with additional comments only.

This scenario tests if a student can successfully submit an empty review by filling in additional comments in a text box.
The detailed steps are as follows-

   1. Login as a student
   2. Select the test assignment for review
   3. Click on link "Others Work"
   4. Click on button "Request a new submission to Review"
   5. Click on the link "Begin"
   6. Fill in the additional comments text box with comment "Excellent work done".
   7. Click on the button "Submit Review".
   8. "Your response was successfully saved" should be displayed.

Execution

The tests were executed by submitting the following command from the terminal.

bundle exec rspec spec/features/peer_review_spec.rb

References

<references></references>