CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests

From Expertiza_Wiki
Jump to navigation Jump to search

Requirement Change

Please note that the requirement for the project has been changed to feature tests (different from the previous review) after discussing with the project mentor and the professor. Updated in Problem statement.

About Expertiza

Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.

Wiki link

Github link

Bidding Feature

The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences. The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.


• Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.

• One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. (More information: https://github.com/peerlogic/IntelligentAssignment)

• During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)

• Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.

Problem Statement

This is an only Testing project to write feature tests for the process. The same is explained in screen shots and video attached. The previous requirement regarding the modifications in sign_up controller have been changed to feature tests and the following problem statements have been taken care of.

Background

Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities. The following need to be taken care of as part of this work package. (E1753)

• Test for the entirety of the bidding process.

• Users are able to place bids on interested topics.

• Users are assigned topics.

File Modified

/spec/features/bidding_spec.rb

Spec Code

All bidding process like creation of assignment, adding topics and enabling bidding has to be performed before every test case. This code is placed in the before block of the rspec test code. This code is executed before all the test cases.

For the first test case, code is written to verify the web-service which runs the bidding algorithm is working properly if the bidding process is enabled.

For the second test case, code is written to verify that the bidding process fails if no participant has placed bids.

For the third test case, code is written to verify that each user is assigned a topic after running the bidding algorithm.

For the fourth test case, code is written to verify that when the user places multiple bids the bid with the highest priority is assigned to the user.


Test Plan

Code Coverage

Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot below shows code coverage before implementation of test cases.

Solution

Code coverage has drastically increased after the integration test cases are executed. Screenshot below shows code coverage after the execution of the test cases.

Manual Tests

Manual testing of features on Local host is done with a running Expertiza environment. ( As seen on video). The following steps have been taken care of to setup ad run the bidding process manually.

• Login as instructor and create assignment. Create topics under the assignment.

• Enable bidding and associated properties for the created assignment.

• Login as student, create teams and bid for projects.

• Login as instructor and run the bidding algorithm.

• Login as student and check if topics are assigned

Automated test cases

The screen shots for the added feature test cases have been attached below. (Also attached as video file). Test cases written to check for the following scenarios.

• Check for whole bidding process to run successfully.

• Check for Error message for unsuccessful bidding run.

• Check if user is assigned a topic successfully.

• Highest priority bid assigned when multiple bids are placed.

Screenshot of the executed integration tests is attached below.