CSC/ECE 517 Fall 2023 - E2387. Reimplement Teams backend (Phase 2): Difference between revisions
No edit summary |
No edit summary |
||
Line 126: | Line 126: | ||
[[File:Tests2 team controller.png]] | [[File:Tests2 team controller.png]] | ||
[[File:TestsAll.jpeg]] | |||
Github PR Link | Github PR Link |
Revision as of 00:07, 5 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
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.
Design and Implementation
FUNCTIONALITY
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
End point summary
Sr No | Method | Endpoint | Request Body | Description |
---|---|---|---|---|
1 | create | POST /teams |
{ "name": String>} |
Create a new team with given team name. |
2 | index | GET /teams |
Get a list of all the teams. | |
3 | show | GET /teams/<team_id> |
Get a particular team with the team_id. | |
4 | update | PATCH /teams/<team_id> | { "name": String>} |
Modify the name of the team. |
5 | destroy | DELETE /teams/<team_id> |
Delete the team. |
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
Team
Mentor
- Kartiki Bhandakkar <kbhanda3@ncsu.edu>
Members
- Raghav Narula <rnarula2@ncsu.edu>
- Mihir Nikam <mvnikam@ncsu.edu>
- Ebani Gogia <egogia@ncsu.edu>