- Web application in which we can add notes.
- User must be logged in in order to use application.
- Tools : Flask - Sqlite3
- Unit Testing
- Integration Testing
- E2E Testing
- User Acceptance Testing
-
In unit test I tested 8 functions,6 functions in NotesRepo (testShowAllNotes, testNumberOfNotes, testShowNoteById, TestAddNote, TestUpdateNote, TestDelete) and 2 functions in AuthRepo(testSignIn, testSignUp).
-
There are 3 phases to each test:
- Given
- When
- Then
-
To run unit tests we can use the command :
coverage run -m unittest Tests/UnitTests/test_units.py
- To see the result of unit tests coverage we can use the commande :
coverage report
-
In Integration test I tested 8 functions (test_register, test_login_page, test_signin_fail, test_signin_success, test_logout, test_notes, test_create_note_page, test_Note_add)
-
There are 3 phases to each test: - Given - When - Then
-
Tests are performed by testing the status code of the response as well as checking if the expected result is included in the response page.
-
To run integration tests along with unit tests we can use the command :
coverage run -m pytest
- To see the result of integration tests along with unit tests coverage we can use the commande :
coverage report
- In E2E tests I tested 3 functions (test_01_register, test_02_signin, test_03_add_Note).
- I used Selenium for this test.
- The navigations by the selenium are saved as screenshots. These screen shots are saved in the file Screenshots.
- To run e2e tests we can use the command :
coverage run -m unittest Tests/E2E/test_e2e.py
- It is divided into 8 sections:
- UAT Scope
- UAT Assumptions and Constraints
- UAT Risks
- UAT Team Roles & Responsibilities
- UAT Entry Criteria
- UAT Requirements-Based Test Cases
- UAT Test Results
- Document Signatures
- CI/CD is a method to frequently deliver apps to customers by introducing automation into the stages of app development. The main concepts attributed to CI/CD are continuous integration, continuous delivery, and continuous deployment.
- The workflow had 2 jobs the first one is a Test Job and the second is a Build job.
- In the test job we test the app with integration tests, unit tests and e2e tests.
- In the build job we build a docker image and pushed it to docker hub
- I added to the workflow another job : Deploy job
- For the deployment i used ECS.
- I created a cluster then a task definition then a service.
- The service has 3 tasks.
- You can access to MyNote app by typing this in the browser link mynote-app-lb-548946768.eu-west-2.elb.amazonaws.com:5000.