sogo/Tests
Wolfgang Sourdeau d73757c3ad Monotone-Parent: becba1041ad050a1189effa1d6444a31a7727dc3
Monotone-Revision: 342a840830ca9a56c37f7c05d3a5defaf3099bb7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-12-22T20:35:19
Monotone-Branch: ca.inverse.sogo
2009-12-22 20:35:19 +00:00
..
README Monotone-Parent: 281488f5ccd9072f8845d50a816057f4a181d5b9 2009-11-26 21:14:56 +00:00
all.py Added the Swedish language in the automated test cases. 2009-11-30 18:51:06 +00:00
config.py.in Monotone-Parent: 9bfc62d1f8b6f1f623da41eaca1ab3b7903a1c63 2009-10-01 13:07:56 +00:00
preferences.py Monotone-Parent: 281488f5ccd9072f8845d50a816057f4a181d5b9 2009-11-26 21:14:56 +00:00
propfind.py Monotone-Parent: 6d46b1f98d1e4729c6c951fd4d0ce045cda38d4f 2009-08-10 16:25:40 +00:00
test-caldav-scheduling.py Monotone-Parent: 413f1a1eef0a131464297caa0b801dbd10e14b8d 2009-08-27 16:20:41 +00:00
test-config.py Monotone-Parent: 44d882d9bb77158fe8b181911db08dab9ca0d76b 2009-10-01 12:20:52 +00:00
test-davacl.py Monotone-Parent: 10eef03af266df87b4a50193c2a0106754ea1c61 2009-08-27 15:59:19 +00:00
test-maildav.py Monotone-Parent: d0eac9f630a7bec45962ad611bb2025a0a264075 2009-10-08 13:04:00 +00:00
test-webdav.py Monotone-Parent: becba1041ad050a1189effa1d6444a31a7727dc3 2009-12-22 20:35:19 +00:00
test-webdavlib.py See ChangeLog 2009-10-05 19:15:14 +00:00
test-webdavsync.py Monotone-Parent: e2c92d491c4f1a4138cd77034e3c0a712bf09003 2009-10-01 16:44:28 +00:00
webdavlib.py Monotone-Parent: d0eac9f630a7bec45962ad611bb2025a0a264075 2009-10-08 13:04:00 +00:00

README

setup
-----

(you need "python-simplejson", "python-xml", "python-vobject" and "python-m2crypto"
 in order to run the scripts on Debian)

1) copy config.py.in to config.py (make sure to never EVER add it to monotone)
2) edit config.py to suit your environment
3) run the test scripts

runnable scripts
----------------

all.py - run all scripts below at once
test-webdavsync.py - explicit
test-davacl.py - dav acl tests for calendar and addressbook modules

other scripts
-------------

propfind.py - a sample implementation of a PROPFIND request using webdavlib

* developers
------------

- Test methods are always prefixed with "test". Sometimes, it's easier to
track down a problem by enabling only one test at a time. One possible method
is to replace "def test" with "def xtest" and replace it back when the
problems are solved.

- Test failures start with "FAIL:". Those are the ones that indicate possible
  bugs in the application, if the test is itself known to work.
  For example like this:

======================================================================
FAIL: 'modify' PUBLIC, 'view all' PRIVATE, 'view d&t' confidential
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./davacl.py", line 75, in testModifyPublicViewAllPrivateViewDConfidential
    self._testRights({ "pu": "m", "pr": "v", "co": "d" })
  File "./davacl.py", line 119, in _testRights
    self._testCreate(rights)
  File "./davacl.py", line 165, in _testCreate
    exp_code)
  File "./davacl.py", line 107, in _putEvent
    % (exp_status, put.response["status"]))
AssertionError: event creation/modification: expected status code '403' (received '201')

- Test errors start with "ERRORS" and most likely indicate a bug in the test
  code itself.

- Always set a doc string on the test methods, especially for complex test
  cases.

- When writing tests, be aware that contrary to unit tests, functional tests
  often imply a logical order between the different steps.