CSC/ECE 517 Fall 2015/oss E1574 BKS
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. <ref>Template:Expertiza GitHub Page</ref>
Introduction
Our contribution in this project is to write feature test for assignment submission by student. The test would mock steps taken by the student to manually submit the assignment.
Problem Statement
Once an assignment is created by the instructor the only call to action for the student is assignment submission. Currently, there is no feature test for assignment submission. The goal is to understand the flow of the assignment submission by student manually and mock this flow in the Feature Tests using RSpec and Capybara.
Assumptions
To successfully implement each scenario in the test, the following assumptions are taken:
- The feature test will use the development environment. In particular, it will use the expertiza_development database.
- A student entry is assumed to be present in the database. The credentials for this student is student13 as username and password as password.
- The assignment created for testing contain no teams and topic selections.
- Users require to first run the ["assignment_creation.rb"], before they can run the tests.
Steps for manual submission
Before analyzing code, one must make themselves familiar with the steps involved in assignment submission by student on Expertiza. The steps involved are:
- Login with valid student username and password
- Click on an assignment to submit
- Click on "Your Work"
- Paste the link or browse to the file containing your work
- Click on "Upload Link" or "Upload File" to submit deliverable
Creating the Tests
Gems involved
Rspec
Capybara
Feature test scenarios covered
Scenarios
- scenario 'student with valid credentials'
- scenario 'no assignment available to submit'
- scenario 'submitting link for finished assignment'
- scenario 'submitting file for finished assignment'
- scenario 'submitting link to ongoing assignment'
- scenario 'submitting file to ongoing assignment'
Code written for feature test
=assignment_creation.rb
=student_assignment_submission.rb
Running the tests
Steps
- Git fork
- bundle install
- db:migrate
- use command rspec spec/features/student_assignment_submission_spec.rb
Test Results=
Project Resources
GitHub Link Video Tutorial Images