Semester Project and Exam Answers for the Software Engineering course, during the 7th semester of the School of Electrical and Computer Engineering at the National Technical University of Athens.
This project's goal is to produce an information system that is responsible for the interoperability on motorway tolls. This will include a backend that will support data management functions between the different toll operators, a CLI that will be used to interact with the system, operating as a client on the backend's REST API and a Web Application that will be used to present the data to the end user, operating as a client on the backend's REST API, as well.
For the development of the application, we used the following tools:
- Design and architecture: Visual Paradigm CE
- Development: Node.js, Express.js, React.js, argparse
- Database: MongoDB
- Source code: GitHub
- Testing: Jest, pytest
- Hackolade - Database schema
- Visual Paradigm file - Required documentation diagrams
- SRS Document - Software Requirements Specification
- StRS Documents - Stakeholders Requirements Specification
- Make sure that you have the latest version of Node.js and MongoDB installed
- Clone the project repository
- Make sure the
mongodprocess is running - To download and install node_modules, navigate to
/backend,/apiand/frontendand run the following command on each directory:
npm install
- To start the Node.js server and connect to the database and then start the Web Application, navigate to
/backendand/frontendand run the following command on each directory:
npm start
- To restore the database from the database dump run:
mongorestore -d tldb database
- Then, you will have a copy of the database and the server running on your local machine
- Install python3, if not already installed.
- Install the
requestspython package, if not already installed:
pip install requests
- Add the CLI path to your OS
$PATHto be able to run the CLI commands without the prefix./for the executables (e.g. as shown below, valid for one session):
PATH=$PATH:/home/username/ntua-software-engineering/cli
- Make sure the
mongodprocess is running, that you have started the server and that it has connected to the database, as shown in the project'sREADME.md. - Use the CLI as specified in the documents, some examples are shown below:
se2123 healthcheck
se2123 passesperstation --station AO10 --datefrom 20201101 --dateto 20201231 --format json
se2123 passesanalysis --op1 aodos --op2 kentriki_odos --datefrom 20200101 --dateto 20200331 --format json
se2123 passescost --op1 gefyra --op2 kentriki_odos --datefrom 20190101 --dateto 20201231 --format csv
se2123 chargesby --op1 aodos --datefrom 20190101 --dateto 20190930 --format json
se2123 admin --passesupd --source ./passes.csv
- Due to limitations from the Jest testing framework, test suites have to be inside the
/apifolder. - The
apitesting.test.jsfile present in this folder is a copy of the file used for testing that resides in the/api/test_apifolder. It is not used during testing.
- In the
/apifolder run:
npm run test_api
- Due to limitations from the Jest testing framework, test suites have to be inside the
/backendfolder. - The
db-connection.testfile present in this folder is a copy of the file used for testing that resides in the/backend/test_backendfolder. It is not used during testing.
- In the
/backendfolder run:
npm run test_backend
- Follow the instructions documented on the CLI's
README.md - This time, use the
tldb-testdatabase, by running the following on/backend:
npm run test_cli
- Install the
pytestframework, if not already installed:
pip install pytest
- Run the
adminandmaintests usingpytest, as shown below (follow this order):
pytest admin.py
pytest main.py
There was 1 exam in total. The naming convention is YYx-identifier where:
YYis the year of the examxis the exam type (a for the regural one and b for the retake one)identifieris the identifier of the file (answers or questions)