Archives August 2012

Selenose 1.3 is out!

With the new Django 1.4+ support for in-browser testing frameworks, it was time for selenose to support django-jenkins, a plug and play continuous integration tool for Django and Jenkins.

Selenose now provides two Selenium related tasks for django-jenkins:

Selenium Server Task

This task starts a Selenium Server before running tests, and stops it at the end of the tests.

To enable it, edit your settings.py and append selenose.tasks.selenium_server to JENKINS_TASKS:

JENKINS_TASKS ...

Continue reading

Selenium tests with Django 1.4+ on Jenkins

In our previous blog post, we saw how to enable Selenium tests on a Django 1.4+ project. Now it's time to see how to integrate it with Jenkins!

Platform

This post assumes a Debian GNU/Linux environment, but you should not have much trouble adapting it to another Linux distribution. All requirements are listed in our initial blog post: Selenium, Python and Jenkins on Debian - 1/3.

Global Configuration

First ensure that the latest version of the ShiningPanda Plugin, Xvnc Plugin, Violations Plugin and Cobertura Plugin are installed (check on Manage Jenkins > Manage Plugins > Installed page). If not ...

Continue reading

Selenium tests with Django 1.4+

With Django 1.4 support for in-browser testing frameworks, it was time to revisit our previous blog posts dedicated to Selenium: Selenium, Python and Jenkins on Debian 1, 2 and 3.

Sample project

This tutorial is based on the poll application from the Django tutorial. It describes all the required steps to run Selenium tests on a Django 1.4+ project, keeping in mind that the final step is to use Jenkins as a continuous integration server. The source code can be found on the django14 branch of this repository.

This sample project is organized as follows:

/media/blog/41/project.png

The following features ...

Continue reading

MySQL table lock with Django

When operating with a relational database like MySQL or PostgreSQL it is sometimes required to use table locks, usually when performing a transaction susceptible to concurrency problems.

As a rule of thumb:

  • a WRITE LOCK on a table is needed when writing to that table while performing a transaction susceptible to concurrency issues,
  • a READ LOCK on a table is needed when reading from that table while performing a transaction susceptible to concurrency issues,
  • when a lock is acquired, all the tables used in the transaction must be locked,
  • all locks must be released when a database transaction is completed ...

Continue reading

Daily archives

Previous month

July 2012

Next month

September 2012

Archives