CSC/ECE 517 Fall 2016/E1664: Feature Test Assignment Creation

From Expertiza_Wiki
Revision as of 00:21, 29 October 2016 by Asingh26 (talk | contribs) (→‎Capybara)
Jump to navigation Jump to search

Background

Objective

Assignment Creation can be done in Expertiza by an instructor for a particular course. Two types of assignments can be created, Private and Public. Further, there are various ways an assignment's attributes can be modified by personalizing reviews, deadlines, teams allocation, rubrics, calibration etc associated with the particular assignment. Each one of these in turn have many other options through which an instructor can be selected and modified. There are many functionalities within assignment creation, thus the main motive for testing of this feature is to ensure that an instructor can create an assignment without any hick-ups with all of its properties intact. And this is

Feature Testing Tools

Test cases have been written using RSpec and Capybara. These two combined prove to be an excellent testing tool at the developer's disposal.

Rspec

RSpec is a very powerful testing tool primarily used Behavior Driven Development (BDD). In RSpec, test cases are written such that they describe the specific functionality in the system being tested and helps user in better visualization of what the test cases are supposed to do.

Capybara

Capybara is another extremely helpful testing tool specifically used for feature testing. It is a web-based automation framework, and coupled with RSpec allows developer to write the test cases which simulate the whole scenario. It comes with a user friendly DSL as the actions specified are very intuitive and easy to understand and follow.

Test Cases

Existing Test Cases

Newly Added Test Cases

1. Test Assignment Creation

a. Test Creating public Assignment

   it "is able to create a public assignment" do
     login_as("instructor6")
     visit "/assignments/new?private=0"
     fill_in 'assignment_form_assignment_name', with: 'public assignment for test'
     select('Course 2', from: 'assignment_form_assignment_course_id')
     fill_in 'assignment_form_assignment_directory_path', with: 'testDirectory'
     fill_in 'assignment_form_assignment_spec_location', with: 'testLocation'
     check("assignment_form_assignment_microtask")
     check("assignment_form_assignment_reviews_visible_to_all")
     check("assignment_form_assignment_is_calibrated")
     uncheck("assignment_form_assignment_availability_flag")
     expect(page).to have_select("assignment_form[assignment][reputation_algorithm]", options: ['--', 'Hamer', 'Lauw'])
     click_button 'Create'
     assignment = Assignment.where(name: 'public assignment for test').first
     expect(assignment).to have_attributes(
       name: 'public assignment for test',
       course_id: Course.find_by_name('Course 2')[:id],
       directory_path: 'testDirectory',
       spec_location: 'testLocation',
       microtask: true,
       is_calibrated: true,
       availability_flag: false
     )
   end
b. Test Creating private Assignment

c. Create Assignment for Team 
d. Create Assignment with Quiz
e. Create Assignment with staggered deadline 
f. Create Assignment with review visible to all reviewers
g. Create public micro-task assignment
h. create calibrated public assignment 

2. Test General Tab of Assignment Creation

a. Edit assignment available to students
b. Edit number of quizzes available to students
c. Edit number of members per team in an Assignment
d. Edit number of members per team 
e. Edit review visible to all other reviewers'
f. Should create teammate review row in rubrics
g. Check if checking calibration shows the tab


3. Test Topic Tab of Assignment Creation

 a. edit topics properties
 b. edit topics properties
 c. Add new topic 
 d. Delete existing topic 

4. Test Rubrics Tab of Assignment Creation

a. Update review questionnaire rubric
b. Update scored question dropdown
c. Updates author feedback questionnaire
d. Update scored question dropdown


5. Test Review Strategy of Assignment Creation

a. Test all auto selects feature

6. Test Due dates tab of assignment Creation

7. Test Adding participants by Instructor

a. Add New Participants to assignment 
b. Verify assignments assigned to participants

Automated Execution via Travis

References