• Summary on Funittest

  last modified April 9 by maikroeder

What was done on Funittest at the Sorrento Sprint

 

Sylvain Viollon and Massimo Azzolini worked on the following points for Funittest during the Sorrento Sprint 2008:

  • Produced a sample functional test of KSS integration in Plone: Inline validation of Archetype fields. The parameterized functional test case let's you freely choose a field of a content type for which inline validation should be tested. (Currently, we are testing title, description and text fields, with more to follow);
  • Added Funittest to a branch of Ploneout (Official buildout tree for Plone);
  • Make a template for Paster to create a functional test (branch funittest-templates of ZopeSkel, a functional test is basically embedded in an egg);
  • Make Funittest work with functional tests in others eggs, so now people are able to write theirs own tests, storing them in their SVN. That's an important requirement in order to independently write tests for customer-specific applications;
  • Updated the documentation;
  • Various improvements, including in logging (OPML logging works now).  

This is how you can run the KSS test in the newest version of Plone:

$ svn co https://svn.plone.org/svn/plone/ploneout/branches/3.1-funittest
$ cd 3.1-funittest
$ python2.4 bootstrap.py­
$ ./bin/buildout
$ ./bin/instance run bin/funittest_zope funittest.plone   # preconfigure Zope instance
$ export PATH=/usr/local/lib/firefox:$PATH                # set your PATH to include the firefox-bin binary
$ ./bin/funittest -p kss -t validation

Some test extensions are available for executing different use case scenarios. Extensions are chosen with the option -e, and example extensions for this test are : 4a, 5a, 5b.

$ ./bin/funittest -p kss -t validation -e 4a # The user presses ok


Note: The path used to get firefox-bin is different depending of system/distribution used. Usually it's /usr/lib/firefox, or /usr/local/lib/firefox. /Application/Firefox.app/Contents/MacOSX can be used on Mac OS X.