Skip to content

Commit

Permalink
Update test and coverage scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
john0227 committed Apr 10, 2024
1 parent 4fff575 commit f70d3b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions test/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,10 @@ REDIS_PID=$!
celery -A its_backend worker -l info &
CELERY_PID=$!
coverage run --branch ${ROOT_DIR}/manage.py runserver --noreload
coverage run --branch -a "${ROOT_DIR}/manage.py" test its_backend.apps.submissions

# Generate report only for models.py and views.py and utils.py and its_utils.py
FILES="${ROOT_DIR}/its_backend/apps/**/models.py","${ROOT_DIR}/its_backend/apps/**/views.py","${ROOT_DIR}/its_backend/apps/submissions/its_utils.py","${ROOT_DIR}/its_backend/apps/submissions/utils.py"
coverage html --include=$FILES
coverage json --include=$FILES
coverage report --include=$FILES

# Generate report for
coverage run "${ROOT_DIR}/manage.py" test its_backend.apps.submissions
coverage report
2 changes: 0 additions & 2 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,9 @@ DJANGO_PID=$!

# Wait for server startup
sleep 5
echo 1111

# Run postman tests
newman run "${TEST_DIR}/${POSTMAN_COLLECTION}"
echo 222

# Run tests for utils.py and its_utils under submission app
python "${ROOT_DIR}/manage.py" test its_backend.apps.submissions

0 comments on commit f70d3b3

Please sign in to comment.