How to configure jenkins to run python tests after every commit or by schedule:
Download and install java on your computer.
Create new job and select run bash:
Download and install java on your computer.
Download last stable version of jenkins for your operating system from the official site
Run with the following command:
java -jar jenkins.war
Assuming that you already have virtualenv and create your virtual environment
$virtualenv mytestenv
$source mytestenv/bin/activate
Install dependencies for python, in our case: nose and nosexunit (for writing and running tests),
pip install nose
pip install nosexunit
pip install selenium
Assuming that you already have virtualenv and create your virtual environment
$virtualenv mytestenv
$source mytestenv/bin/activate
Install dependencies for python, in our case: nose and nosexunit (for writing and running tests),
pip install nose
pip install nosexunit
pip install selenium
open a browser and go to http://127.0.0.1:8080 jenkins web interface
install git plugin
Create new job and select run bash:
Put the path to your git working copy: /home/yourname/your_repository
And add the following script:
#!/bin/bash -ex
source /home/andrii/Downloads/mytestdir/bin/activate
nosetests tests.py --with-nosexunit
And add it for reporting:
target/NoseXUnit/core/*.xml
And add the following script:
#!/bin/bash -ex
source /home/andrii/Downloads/mytestdir/bin/activate
nosetests tests.py --with-nosexunit
And add it for reporting:
target/NoseXUnit/core/*.xml