sogo/Tests/Integration
Ludovic Marcotte 220410b446 forgot file in previous commit
Monotone-Parent: a23f9b6b633e53869f52361213e6478e36384813
Monotone-Revision: dab3668bce4278be22f243f5c2d650104d8d89fe

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-10-07T17:11:24
Monotone-Branch: ca.inverse.sogo
2011-10-07 17:11:24 +00:00
..
GNUmakefile Converted teststrings into a tool 2011-10-07 15:27:41 +00:00
GNUmakefile.preamble forgot file in previous commit 2011-10-07 17:11:24 +00:00
README Added migration script for Oracle Calendar. Updates the guides for the 1.3.1 release and the NEWS file. 2010-08-19 13:48:53 +00:00
all.py Monotone-Parent: 7ee997ad520d61e48d2f051e02d433791c47fd08 2011-04-01 19:43:11 +00:00
config.py.in Add a rudimentary test for sogo-tool 2011-05-20 20:22:56 +00:00
ev_generator.py Monotone-Parent: e9d4010d6c952c0aa503fa4571a589fb91c356b5 2010-07-13 17:36:32 +00:00
managesieve.py Imported managesieve.py: implements the client side of the managesieve protocol 2011-05-03 12:37:34 +00:00
preferences.py Added Icelandic translation - thanks to Anna Jonna Armannsdottir <annaj@hi.is> 2011-05-11 19:12:47 +00:00
propfind.py See ChangeLog 2010-01-24 20:40:12 +00:00
sogoLogin.py Add options handling to sogoLogin.py 2011-06-27 22:43:48 +00:00
sogotests.py Monotone-Parent: 16e84a4b9506eba9d39a96290c969eda838704a2 2010-07-13 16:02:56 +00:00
test-caldav-scheduling.py Imported managesieve.py: implements the client side of the managesieve protocol 2011-05-03 12:37:34 +00:00
test-config.py Monotone-Parent: 16e84a4b9506eba9d39a96290c969eda838704a2 2010-07-13 16:02:56 +00:00
test-contact-categories.py Monotone-Parent: 08ff4ed5c2f1ac739d34cf7fe2a75f3b3ac2d7dd 2010-10-27 14:20:09 +00:00
test-davacl.py Monotone-Parent: 2a5644700c095d7f9f967370b2341e2850d50787 2010-11-17 15:22:15 +00:00
test-ical.py Monotone-Parent: 20415379d4ad22b602692f50041a0eb207e1d1fb 2011-04-01 18:48:24 +00:00
test-maildav.py Monotone-Parent: 16e84a4b9506eba9d39a96290c969eda838704a2 2010-07-13 16:02:56 +00:00
test-sieve.py Fix a typo 2011-05-19 21:19:28 +00:00
test-sogo-tool.py Add a rudimentary test for sogo-tool 2011-05-20 20:22:56 +00:00
test-webdav.py Monotone-Parent: 16e84a4b9506eba9d39a96290c969eda838704a2 2010-07-13 16:02:56 +00:00
test-webdavlib.py Monotone-Parent: 16e84a4b9506eba9d39a96290c969eda838704a2 2010-07-13 16:02:56 +00:00
test-webdavsync.py Monotone-Parent: 16e84a4b9506eba9d39a96290c969eda838704a2 2010-07-13 16:02:56 +00:00
teststrings.m Monotone-Parent: 766baf56d74d898b08d6a686cdd909e3825d8e2f 2010-11-03 14:27:31 +00:00
teststrings.sh Converted teststrings into a tool 2011-10-07 15:27:41 +00:00
utilities.py Monotone-Parent: d8678bc76a58d190f4f7fc03f138123104dfb577 2010-09-20 13:42:16 +00:00
webdavlib.py Monotone-Parent: 3774742a6943dc4914fba97472a150d427c3f883 2010-06-02 16:46:06 +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) make sure that you use a fresh database, with no prior information in it
4) make sure that SOGoCalendarDefaultRoles and SOGoContactsDefaultRoles are empty or undefined
5) 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 contrarily to unit tests, functional tests
  often imply a logical order between the different steps.