I would like to run headless tests against my Django web app using: 
https://github.com/dobarkod/django-casper in a jenkins job. Basically what 
I need in my jenkins job is:

   1. clone latest version of my django web app
   2. Install django (e.g. in a Python virtual env. in the workspace)
   3. Start django web server hosting my web app
   4. Run casper headless test
   5. Report result
   6. Stop/remove django web server

Are there any recommended approaches to doing the above; automatically 
start, test and stop a django web server? I would like to keep apache 
configuration out of this if possible.

Currently I have covered bullet 1-2 above but am facing problems with 
starting the django web server in the jenkins job - for some reason it 
never starts, just hangs. Below is the script I am using:

#!/bin/bash

STAGING_DIR="staging"
rm -Rf $STAGING_DIR
mkdir $STAGING_DIR
cd $STAGING_DIR

git clone [git-url] .
virtualenv --no-site-packages virtual_django
source virtual_django/bin/activate
pip install django

# hangs
python manage.py runserver 0.0.0.0:8000

# Todo: Start casperjs tests

# Todo: Report result

# Todo: Shutdown django webserver



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8afa081d-0185-44a7-a74d-e039f4b8e47f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to