Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto run unit test cases in Python

We have a python based web application along with its unit test cases. Our need is to automate the process of running unit test cases. They should run either after every checking OR after every fixed time interval. With minimal effort and time what is best tool that we can use to automate this process. We are using Linux as OS and git as source control.

like image 526
Programmer Avatar asked Nov 06 '09 06:11

Programmer


2 Answers

You're basically looking for continuous integration tools and processes (I mention the term of art because it helps you research the subject in more depth). buildbot is the most popular Python system for the purpose and I would recommend it -- see here for more.

like image 85
Alex Martelli Avatar answered Sep 28 '22 09:09

Alex Martelli


Hudson is a good choice for this - I've used it with success in the past. It will monitor the git repository for changes; run the tests and report on failures. It will maintain a history of tests in your project. It has a large number of plugins to support python projects. The Cobertura plugin provides code coverage reports and the violations plugin integrated with pylint to give you an idea of your code quality.

There is a good article on getting it setup on Setting up a Python CI Server on the Rhonabwy.com.

like image 32
Robert Christie Avatar answered Sep 28 '22 09:09

Robert Christie