CSC/ECE 517 Fall 2023 - E2387. Reimplement Teams backend (Phase 2): Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 63: Line 63:
== Test Plan ==  
== Test Plan ==  


We utilized RSpec as the testing framework for our system and the development process followed Test Driven Development and we wrote our tests first and then proceeded with Development. The tests were written in a comprehensive way.
We utilized RSpec as the testing framework for our system and the development process followed Test Driven Development. The controller tests were written in a comprehensive way.  
 
To run the controller tests:
 
1. git clone
 
2. cd reimplementation-back-end/
 
3. bundle install
 
4. bundle exec rspec spec/requests/api/v1/teams_spec.rb
 
{| class="wikitable" style="margin-left:30px"
|-
! Sr No !! Test !! Description
|-
| 1 || Test to list all Teams || This test verifies if the system can successfully retrieve a list of all teams available in the system.
|-
| 2 || Test to create a new Team || This test verifies if the system can successfully create a new team with valid parameters such as team name
|-
| 3 || Test to update Team Name || This test verifies if the system can handle updating team name with valid parameters such as team name.
|-
| 4 || Test to delete a Team || This test verifies if the system can team deletion
|-
 
|}


[[ File:Tests1 team controller.png ]]  
[[ File:Tests1 team controller.png ]]  

Revision as of 22:19, 4 December 2023

Overview of Expertiza

Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.

Technologies Used for the Design

1. Ruby on Rails

2. Rspec (for Testing)

3. Swagger UI

Changes Made

The Teams schema was not properly implemented and we have added more attributes.

Before Schema

Following attributes would be added to the teams table - 1. Name of the Team (Unique) 2. Team ID (Unique)

Final Schema. We also added foreign keys in the Users table as one Team can have many Users


Methods Added

We also added new controller (teams_controller.rb) in which we added the following methods.

1. create

This will create a new team.

2. index

This will list all the teams.

3. update

This will update the team's name.

4. destroy

This will delete the team.


Validations

Only Admins should be able to access this page.

1. Team ID's should be unique.

2. If a team member is already added to another team, it should give appropriate error.

ER Diagram

Test Plan

We utilized RSpec as the testing framework for our system and the development process followed Test Driven Development. The controller tests were written in a comprehensive way.

To run the controller tests:

1. git clone

2. cd reimplementation-back-end/

3. bundle install

4. bundle exec rspec spec/requests/api/v1/teams_spec.rb

Sr No Test Description
1 Test to list all Teams This test verifies if the system can successfully retrieve a list of all teams available in the system.
2 Test to create a new Team This test verifies if the system can successfully create a new team with valid parameters such as team name
3 Test to update Team Name This test verifies if the system can handle updating team name with valid parameters such as team name.
4 Test to delete a Team This test verifies if the system can team deletion


Github PR Link

[1]


Team

Mentor
  • Kartiki Bhandakkar <kbhanda3@ncsu.edu>
Members
  • Raghav Narula <rnarula2@ncsu.edu>
  • Mihir Nikam <mvnikam@ncsu.edu>
  • Ebani Gogia <egogia@ncsu.edu>