Litary - A library management web app to organise a personal literature library
Literary – The Literature Management App 1
The basic requirements set by the academy are to: 'To create a CRUD application with utilisation of supporting tools, methodologies and technologies that encapsulate all core modules covered during training.' In more detail this means that the entire project requires the following features and structures:
-
A project tracking board with full expansion on user stories, use cases and tasks needed to complete the project.
-
A relational database (RDBMS) with at least 2 tables.
-
Clear Documentation from a design phase describing the architecture you will use for you project as well as a detailed Risk Assessment.
-
A functional CRUD application created in Python, following best practices and design principles, that meets the requirements set on the project tracking board
-
Fully designed test suites for the application with at least 75% test coverage in your backend and provide consistent reports and evidence to support a TDD approach.
-
A functioning front-end website and integrated API's, using Flask.
-
Code fully integrated into a Version Control System using the Feature-Branch model which will subsequently be built through a CI server and deployed to a cloud-based virtual machine.
To satisfy the requirements I developed a simple app called 'Literary' a neologism of 'literature' and 'library' the apps purpose is to enable the user to store and amend their personal library. In computer programming, create, read (aka retrieve), update, and delete, (CRUD) are the four basic functions of persistent storage. The app is split into 3 basic tables:
- USERS – This satisfies CREATE.
- First Name – user first name
- Last Name – user last name
- Password
- BOOKS - Add and Amend books This satisfies CREATE and UPDATE.
- First Name – author first name
- Surname – author surname
- Title – book title
- Pages – number of pages
- Language
- RATING - Add a rating:
- Rating – rating between 1 and 6
- Comment
- List of Total Books in the library - This satisfies READ.
- Delete a Book entry and Rating entry This satisfies DELETE.
Jira was the chosen method when planning the project and tracking the progress and to satisfy the brief. This increment (v.1) has been set to be delivered within 1 standard length sprint of 2 weeks starting on the 27/7/20 to be completed on the 10/8/20 the delivery date for the first increment and project deadline. The current sprint named BPN Sprint 1, contains one epic which represent this release. These then are split in individual user stories focused on backend (routes, models and forms), front end (HTML) functionality, testing and documentation. Each user story has several children which represent the smaller steps which needed to be completed.
This release all user stories have been completed apart from one Front-End child, due to time constrains. This will be transferred backlog and completed in the next sprint.
A basic Entry Relation Diagram (ERD) was created to illustrate the relationship between the tables and to satisfy the brief model the** relationship.** As seen below there are 3 main tables. The most important are the book-lib and main_lib tables because part of the brief was to must create 2 different entities with a different relationship.
Continuous Integration
Below is the CI pipeline used for this project and includes the relationships between each tool and the frameworks used to create the app, perform sufficient tests and the deployment of the app and illustrated how the requirements were satisfied. Code was developed in python and pushed to Git hub using GIT which corresponded with Jira our project tracking app on which segments of code were related to which task. Next via the webhook Jenkins was informed which triggered automated testing of the code via pytest. If passed Jenkins triggered a build which send the updated testing via GCP (host) and flask (framework) to the live environment, while the dev continued to dynamically test using GC/Flask in python until the code was bug free.
Testing
The tools used for testing the application was Pytest when conducting unit tests, while selenium was used while performing integration tests. The requirement was reach to the 78% coverage report. While a total coverage of 78% percent was reached there was a fundamental problem with the integration tests which continued to fail. This is due to the registration and login xpaths of the HTML website which selenium was unable to find when following the main syntax offered on the QA Academy portal (Community).
Risk Assessment
The risk assessment produced for the project can be found below. It attempts to cover all risks or threats involved and what would be done to eliminate or reduce the impact of these threats.
Description | Assessment | Risk | Impact | Responsibility | Response | Tolerance |
---|---|---|---|---|---|---|
HTTPs traffic and data breach | Connecting to Googles VM are not secure. Any data transferred could be read by outsiders | Medium | High | Jacob grub | In this could we would need to take the website offline and make an overall root and user password reset | Treat |
SQL Database crashes | If the cloud host goes down access to the database would fail and the website could not be accessed | Low | High | Google Cloud Platform | Switch to a different cloud provided while contacting GCP | Tolerable |
Too much traffic on the app | If multiple users try to access the website it could be overloaded | Low | Low | Jacob Grub | We can increase the number of workers in Gunicron to avoid this | Tolerable |
There are a few bugs with the current build of the app:
- When the user tries to look at the ratings of each book, the ratings are displayed by without the corresponding title.
- When the user enters a duplicate title instead of a warning an error page comes up
There are a number of improvements I would like to add:
- Design features. The website is too bland and not enjoyable at this stage
- New functionality as in entering the date a book has been completed
Jacob Grub
Thanks to QA Consulting for their expertise and teaching
1https://jacobhpgrub.atlassian.net/jira/software/projects/LQA/boards/4
2https://docs.google.com/presentation/d/1tmI6CsPoRDrYkRan2wcBzMjVTFV2sa-NJym296z4DCE/edit
4https://github.com/jcbgrub/increment
5https://portal.qa-community.co.uk/~/devops/projects/fundamental--devops