Skip to content

Latest commit

 

History

History
67 lines (54 loc) · 1.93 KB

README.md

File metadata and controls

67 lines (54 loc) · 1.93 KB

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