Skip to content
Guillermo Guerrero Ibarra edited this page Jan 17, 2017 · 8 revisions

Goal

This is a Django project to exemplify how important is including testing into your software projects. The application have been copied from hjwp/book-example.

Getting started with the Django app

Build Status Style Status Coverage Status Code Climate AUR

Heroku deployment: https://testing-example.herokuapp.com

## Install dependencies

For Production or Development environment:

pip3 install -r requirements.txt

For testing environment:

pip3 install -r requirements-test.txt

## Prepare the database: To initialise the database execute:

python3 manage.py migrate

## Run server To run the server execute:

python3 manage.py runserver 0.0.0.0:8000

Guide

To deal with this project, we would need to complete these steps to build the guide of the project. All these steps may be candidate of being git branches.

Gruide proposal:

  1. Create a Django app, hello-world-like app. Pull request.
  2. Transform it to a web calculator with sum operation. Pull request.
  3. Link it to heroku and deploy it.
  4. Update calculator and make sum operation behave wrong. Pull request. See what happens in production (heroku).
  5. Add unitary tests for calculator. Pull request. Correct code to pass tests. Update production (heroku).
  6. Update calculator with modification that break unitary tests. Pull request. Check that it does not pass tests.
  7. Add test coverage. Pull request. Require % to pass tests (?). Add tests if necessary.
  8. Add linter. Pull request. Pass linter checkings.

Branches

For any key step in the process of building this tested project we will be building branches and pull requests to exemplify the tasks being developed on each step.

The content of the process itself will be detailed in the README.md of the branch. The README.md of a branch for a specific step will include the content of the prior step and it will extend the content correspondingly.

Clone this wiki locally