Personal tools
You are here: Home Documentation Tutorials Common Plone programming recipes Developer scripts
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Developer scripts

Command line scripts which are useful in product development

Mikko Ohtamaa

Basics of accessing and modifying objects programmatically using Python, Plone's programming language.
Page 16 of 21.

Unit test runner for Windows

Since Plone 2.5.1 invoking per product unit test modules has become a major pain.

NOTE: This is only necessary on MS Windows. Linux, OSX and other *NIX platforms can run the tests normally from the commandline.


Here is a short .bat file which allows one to run unit tests within the context of one product.
@echo off

REM Invoking unit test directly doesn't work anymore on Plone 2.5.1
REM See http://plone.org/documentation/error/attributeerror-test_user_1_

set PYTHON=d:\python24\python.exe
set ZOPE_HOME=F:\workspace\plone-2.5.1\Zope-2.9.6\Zope
set INSTANCE_HOME=F:/workspace/plone-2.5.1/instance
set SOFTWARE_HOME=%ZOPE_HOME%\lib\python
set CONFIG_FILE=%INSTANCE_HOME%\etc\zope.conf
set PYTHONPATH=%SOFTWARE_HOME%
set TEST_RUN=%ZOPE_HOME%\bin\test.py

"%PYTHON%" "%TEST_RUN%" --config-file="%CONFIG_FILE%" --usecompiled -vp --package-path=%INSTANCE_HOME%/Products/lsmintra Products.lsmintra

 
by Mikko Ohtamaa last modified May 16, 2007 - 12:26
Contributors: Mikko Ohtamaa
All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by