Code Monkey home page Code Monkey logo

tp_tuc_examen's Introduction

Anas Ikli, Younes Ouartassi, Yacine Kerrad

Plan Des tests : https://docs.google.com/document/d/1Z66k990kGvgd-aBt-q1VCxnfxZOu_j1AM7N2Av2_vd4/edit?usp=sharing

Préparer son environnement

Installer le paquet virtualenv

pip install virtualenv

Créer l'environnement virtuel

python -m venv venv

venv correspond au chemin/dossier dans lequel sera activé votre environnement virtuel (Dans notre cas, dans le dossier où est exécuté la commande, dans le dossier venv)

Activer l'environnement virtuel

Linux/Mac : source venv/bin/activate Windows : ./venv/Scripts/activate

Si sur windows vous ne pouvez exécuter le script en .ps1, ouvrer un powershelle en admin et exécuter

set-executionpolicy unrestricted

Installer les paquets

pip install fastapi locust pytest uvicorn coverage httpx pytest-mock pytest-profiling pylint sqlalchemy pydantic

Démarrer l'application

uvicorn main:app --reload # pour développer (recharge automatique l'application à chaque changement d'un fichier)

Exécuter dans le dossier application

Pytest

python -m pytest

Coverage

coverage run -m pytest --profile # remplace la commande python coverage html # génère le rapport en html

##Pourcentage coverage :

coverage report --fail-under=90

Exécuter à la racine du dossier

Locust

locust -f locust.py

Pylint

pylint application/ tests/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.