Skip to content

OpenClassrooms-Student-Center/7155841-Python-testing-Django

Repository files navigation

forthebadge forthebadge

Django-Test-Project

This project has been created for you to practice different types of testing. The source code contains a Django project for a mini e-commerce site. You can use it to develop a set of scenarios needed to test all of the source code. Note that the suggested solutions are available in different branches of the directory structure.

Prerequisites

Installation

  1. Download the Project to Your Local Directory:
git clone https://github.com/OpenClassrooms-Student-Center/4425126-testing-python.git 
cd 4425126-testing-python
  1. Set up a Virtual Environment:
  • Create the virtual environment: python -m venv venv
  • Activate the virtual environment:
    • Windows: venv\Scripts\activate.bat
    • Unix/MacOS: source venv/bin/activate
  1. Install project dependencies
pip install -r requirements.txt

Run

  • Run the server using the following command: python manage.py runserver

Solutions

  1. Suggested solution for unit testing using Pytest:
git checkout pytest-test
pytest
  1. Suggested solution for unit testing using fixtures:
git checkout fixture-test
pytest
  1. Suggested solution for unit testing using classes:
git checkout class-test
pytest
  1. Suggested solution for integration testing:
git checkout integration-test
pytest
  1. Suggested solution for functional testing (don't forget to download the webdriver):
git checkout functional-test
python manage.py test
  1. Suggested solution for performance testing:
git checkout performance-test
locust

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published