Skip to content

Jliezed/oc_project_11_gudlft

 
 

Repository files navigation

oc testing unit-testing pytest pytes-mock pytest-cov debugging bugs qa coverage locust


OC - PROJECT N°11 - Improve a Python web application through testing and debugging

Güdlft, a digital platform to coordinate strength competitions (deadlifting, strongman) in North America and Australia.

By Jason Richard

Project Overview

Debug and add tests to a Python web application (https://github.com/OpenClassrooms-Student-Center/Python_Testing). Generate a test coverage report and a performance report using Locust.

(back to top)

Built With

  • Python
  • Pytest
  • Pytest Mock
  • Pytest Coverage
  • Locust

(back to top)

Getting Started

Clone the repo

git clone https://github.com/Jliezed/oc_project_11_gudlft.git

Install venv library (if not yet in your computer)

pip install venv

Create a virtual environment

python -m venv env

Activate the virtual environment

source env/bin/activate

Install the packages using requirements.txt

pip install -r requirements.txt

Run the application

export FLASK_APP=server.py
flask run

Access the app: http://127.0.0.1:5000


(back to top)

Run tests and generate coverage report

Run tests

pytest

Generate coverage report

 pytest --cov
 pytest --cov=. --cov-report html

coverage-main coverage-detail


Run Locust performance test

Run Locust

cd tests
cd performance_tests
locust

locust

(back to top)

Releases

No releases published

Packages

No packages published

Languages

  • Python 80.0%
  • HTML 20.0%