COMS 4156 ASE Team Project
Asmita Kumar (ak4581)
Shikha Asrani (sa3864)
Soamya Agrawal (sa3881)
Vani Jain (vj2245)
First Iteration Report:
Link: https://github.com/SoamyaAgrawal17/SAVS/blob/main/documentation/Assignment%20T3_First%20Iteration.pdf
Second Iteration Report:
Link: https://github.com/SoamyaAgrawal17/SAVS/blob/main/documentation/Assignment%20T5_Second%20Iteration.pdf
Documented API:
First Iteration Link: https://app.swaggerhub.com/apis/savs2/SAVS/1.0.0
Second Iteration Link: https://app.swaggerhub.com/apis-docs/ShikhaAsrani/SAVS/2#/
System Tests Corresponding to API:
Iteration 1:
Link: https://documenter.getpostman.com/view/14290543/UVC9gkKY
We used Postman test suite to run the integration tests. The API entry points are implemented in ClubsController, EventsController, StudentsController.
Postman collection json: https://github.com/SoamyaAgrawal17/SAVS/blob/main/SAVS.postman_collection.json
Postman run result : https://github.com/SoamyaAgrawal17/SAVS/blob/main/SAVS.postman_test_run.json
Iteration 2:
Authentication Suite Doc Link: https://documenter.getpostman.com/view/14290543/UVR5po3o
Test Suite Doc Link: https://documenter.getpostman.com/view/14290543/UVR4PqZQ
We used Postman suite to run the complete integration tests. Before running the test suite, we run authentication suite. This includes all entry points that are implemented.Postman authentication and test suites are located in the shared Postman workspace.
Postman run result: https://github.com/SoamyaAgrawal17/SAVS/blob/main/SAVS%20Final%20Integration%20Test%20suite.postman_test_run.json
Unit Tests:
Command to run unit test: coverage run -m unittest discover test
We have covered all the methods implemented in ClubService, EventService, and StudentService.
For Controller methods, we have used the above System Tests. Unit tests for Controllers is planned to be implemented as part of the next iteration.
Style-compliant:
We used the command flake8 application>bugs.txt and flake8 test>bugs1.txt. We have fixed all the major bugs as part of this iteration.
This is also added to CI pipeline.
Build, run, test instructions:
We have deployed the code on Heroku. And below are the configurations for the same.
Configuration:
Endpoint: https://savs-project-final.herokuapp.com/
Production Database: postgresql://xbasblmhnpkibi:8a1264b9c4b71b4c8abac23f12fc7a991e3fe81671b1169a0d09c6692f7606f4@ec2-18-207-72-235.compute-1.amazonaws.com:5432/d1qeu6i6agoejb
Test Database: postgresql://ganjvezplkwnyf:c2ab9de3ce2ca931f13aa6e62667607ac5f19929425b7ef16a237fe61c664d97@ec2-34-198-189-252.compute-1.amazonaws.com:5432/dbjeqssrqgcj15
To build, run and test on localhost or Heroku, follow the following steps:
- git clone https://github.com/SoamyaAgrawal17/SAVS
- Create a virtual environment and activate it. Command: python3 -m virtualenv venv > source venv/bin/activate
- pip3 install -r requirements.txt
- python3 freeze> requirements.txt
- python3 app.py
- The application would run on port 5000
- To deploy the code on Heroku, follow the instructions in the following reference link: https://medium.com/analytics-vidhya/heroku-deploy-your-flask-app-with-a-database-online-d19274a7a749
- To run the code on local, postgres db has to be setup in local, and replace the
- To connect to your local database, replace app.config['SQLALCHEMY_DATABASE_URI'] in app.py with 'postgresql://:@localhost:5432/'
- Manual Testing can be done by using the above Endpoint.
- Unit Testing could be done by running the command coverage run -m unittest discover test or using push button to run all the unit tests.
- For integration testing run the collection SAVS on Postman(The collection json is shared in the Postman workspace).
To build client:
- Install node: https://nodejs.org/en/download/
- Alternative through Homebrew: brew install node
- Check if node is installed: node -v
- Add your Google Client ID in index2.html
- Go to SAVS/client and run: node app.js
- Open Chrome in Guest mode or any other browser after logging out from google accounts and go to http://localhost:8080
The skeleton code for google sign in button has been adapted from https://developers.google.com/identity/sign-in/web/build-button
- Click on the "green tick" ("red cross" if CircleCI encountered any issues) marked as "1" in the above image to show the menu.
- Bug Finder using SonarCloud: Click on details marked by "2" to get detailed report generated by SonarCloud.
- CircleCI Report for SonarCloud: Click on details marked by "3" to get detailed report generated while running SonarCloud through CircleCI.
- Unit Test Cases and Coverage: Click on details marked by "4" to get detailed report generated while building the applications and running the unit test cases and coverage. You can access the coverage report for all the files by navigating to Artifacts > htmlcov/index.html
- Style Checker using Flake: Click on details marked by "5" to get detailed report generated while running style checker.