sogo/Tests/Integration
Luc Charland bba0d6f44d make the tests more robust when data is invalid in DB/Webdav 2015-08-27 11:51:58 -04:00
..
GNUmakefile Fixed include 2014-10-02 10:50:34 -04:00
GNUmakefile.preamble Revert back to using GNUSTEP_SYSTEM_LIBRARIES for teststrings 2014-12-16 13:17:59 -05:00
README Fixed typo 2014-09-17 09:36:35 -04:00
all.py Monotone-Parent: 7ee997ad520d61e48d2f051e02d433791c47fd08 2011-04-01 19:43:11 +00:00
carddav.py make the tests more robust when data is invalid in DB/Webdav 2015-08-27 11:51:58 -04:00
config.py.in putting test-prevent-invitations back in 2014-09-10 10:25:42 -04: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 fixed when strings not initialized in prefs 2015-08-27 11:51:58 -04:00
propfind.py replace xml.dom.ext by xml.dom.minidom 2013-08-01 12:48:42 -04:00
sogoLogin.py Changed login from urlencoded to json 2015-06-12 11:46:48 -04:00
sogotests.py Monotone-Parent: 16e84a4b9506eba9d39a96290c969eda838704a2 2010-07-13 16:02:56 +00:00
test-caldav-scheduling.py Use self.attendee1_client when adding his event 2012-09-21 13:16:50 -04:00
test-carddav.py make the tests more robust when data is invalid in DB/Webdav 2015-08-27 11:51:58 -04: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 Fixed test 2014-11-10 08:58:30 -05:00
test-default-classification.py Monotone-Parent: ebe6d4bf201db3d567631a28731d5d2345f7ab9e 2012-02-21 16:19:46 +00:00
test-ical.py * SoObjects/Appointments/SOGoAppointmentObject.m (PUTAction): 2012-05-11 16:20:45 +00:00
test-maildav.py Monotone-Parent: 0c045ab1e972ecf31a2d5051abbc0ef141461d10 2012-02-10 21:03:29 +00:00
test-preferences.py All tests now pass in version 3 2015-06-12 11:59:03 -04:00
test-prevent-invitations.py fixed when strings not initialized in prefs 2015-08-27 11:51:58 -04:00
test-sieve.py All tests now pass in version 3 2015-06-12 11:59:03 -04:00
test-sogo-tool.py test-sogo-tool.py: Use sudo instead of su - 2013-01-22 15:24:21 -05:00
test-ui-posts.py Use Json for testing webcalendar 2015-08-14 12:46:37 -04: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 Fixed unit test. 2014-05-08 09:13:37 -04: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 Fixed test since we now return a 200 instead of a 204 2014-07-25 08:12:12 -04:00
webdavlib.py removed the unneeded sleep 2015-06-12 11:59:04 -04:00
webdavsync-tool.py Fixed tests regarding new WebDAV sync responses 2013-09-25 08:46:34 -04:00

README

setup
-----

(you need "python-simplejson", "python-xml", "python-vobject", "python-dateutil" 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 git)
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.