bounswe / bounswe2024group2

GitHub repository for the CMPE 352/451 Group 2 project.
http://159.223.28.163:30001/
6 stars 0 forks source link

[Lab 7] Testing Strategy #399

Open Halil-Ibrahim-Kasapoglu opened 6 hours ago

Halil-Ibrahim-Kasapoglu commented 6 hours ago

This PR will cover work done related to lab 7 assignments.

Lab 7 description of Nov 19:

•⁠  ⁠Create a PR dedicated to this lab session where you will link work done in this lab: commits, wiki pages, issues, meeting notes, etc. Start the PR with a commit in a new branch. Then, add commits to the branch, and document all the work in the PR description and comments. The commits should include co-authors, if there are any, see [here](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors). The description and comments should include the names of the main contributors related to the linked work. The PR should be finalized today at 8:00 PM.
•⁠  ⁠Plan for the demo next week, including data population strategy, scenario, etc.
•⁠  ⁠Outline the software quality plan, including unit test coverage and integration testing.
•⁠  ⁠Document the user experience decisions made in the previous lab.
•⁠  ⁠Individuals can work on other things related to the milestone 2 preparation, if the previous items are to be met.
Halil-Ibrahim-Kasapoglu commented 6 hours ago

•⁠ ⁠Document the user experience decisions made in the previous lab.

See previous lab 6 PR #385. Wiki documentation comment and also view created issues stated in pr content.

cemgungor1 commented 4 hours ago

Demo scenarios are created. Can take a look at here #400

oguzpancuk commented 4 hours ago

We've decided to use Faker to generate and populate data into our system.

Here's a plan of how to use it:

  1. Define data requirements
    1. Identify the models needing dummy data and determine the relationships and constraints: (Currency, Stock, Tag, Portfolio, Post, Comment)
    2. Decide on the number of entries for each model
  2. Create a new python file populate.py to write the population script
  3. Modify the Docker Configuration
    1. Add latest version of Faker to requirements.txt for installation
    2. Modify the docker-compose.yml file to automate the data population during the container's startup phase.

      command: > 

      sh -c " 
      
python manage.py migrate && 

      
python manage.py shell < bounswe2024group2/backend/populate.py && 
      

“
  4. Check populate.py to ensure foreign keys are handled properly for relationships and constraints
  5. Build and run the Docker Containers
Halil-Ibrahim-Kasapoglu commented 4 hours ago

We have created and example integration test using jest with @mahmutbugramert. See commit

rukiyeaslan commented 4 hours ago

Testing in Backend

Testing for backend will be managed by using unit tests and integration tests. For each endpoint that's created in the backend, unit tests and integration tests covering each success and fail scenarios to catch edge cases will be implemented.

Unit Tests

Integration Tests

Tests for news endpoint, where news are fetched from different RSS feeds, are implemented implemented in this PR and can be found here:

m-erkam commented 4 hours ago

We decided to use Jest to test our React Native application with my teammate @furkansenkal. Also, we created tests for login and profile pages that covers rendering for both pages and logging in for login page.

mahmutbugramert commented 4 hours ago

We have created and example integration test using jest with @mahmutbugramert. See commit

Fixes #402