1.1 --- a/docs/wiki/Testing Sun Apr 03 22:41:28 2016 +0200
1.2 +++ b/docs/wiki/Testing Sun Apr 03 23:21:31 2016 +0200
1.3 @@ -90,6 +90,19 @@
1.4 are presented with message content, and testing for the desired effects of
1.5 running those programs with such content.
1.6
1.7 +{{{
1.8 +./test_all.sh
1.9 +}}}
1.10 +
1.11 +To run all tests against a different data store, such as a
1.12 +[[../DatabaseStore|database store]] instead of the [[../FileStore|file store]],
1.13 +the `STORE_TYPE` environment variable can be specified as in the following
1.14 +example:
1.15 +
1.16 +{{{
1.17 +STORE_TYPE=postgresql ./test_all.sh
1.18 +}}}
1.19 +
1.20 Individual tests may also be run directly from the topmost level of the
1.21 source code distribution. For example:
1.22
1.23 @@ -104,3 +117,50 @@
1.24 output from various commands from the last test script invocation; the
1.25 `err.tmp` will contain tracebacks indicating serious error conditions,
1.26 should any have occurred.
1.27 +
1.28 +== Testing in the Deployment Environment ==
1.29 +
1.30 +Although the above testing may indicate that the software is functional,
1.31 +it does not demonstrate that the software has been successfully integrated
1.32 +into the deployment environment. One elementary test involves sending mail
1.33 +to an address that should be configured to handle incoming calendar messages.
1.34 +
1.35 +A basic script is provided that replicates a subset of the functionality in
1.36 +the traditional `mail` command for sending messages. It is invoked by
1.37 +specifying the sender and recipients of a message and by passing the message
1.38 +itself to the script's standard input. For example:
1.39 +
1.40 +{{{
1.41 +tools/sendmail.py paul.boddie@example.com resource-room-confroom@example.com \
1.42 + < tests/templates/event-request.txt
1.43 +}}}
1.44 +
1.45 +Here, the sender (`paul.boddie@example.com`) and recipient
1.46 +(`resource-room-confroom@example.com`) must match the identities specified
1.47 +within the supplied file (`tests/templates/event-request.txt`), and for a
1.48 +specific deployment environment these identities will need to be changed.
1.49 +The following lines from the supplied file would be involved:
1.50 +
1.51 +{{{
1.52 +From: paul.boddie@example.com
1.53 +To: resource-room-confroom@example.com
1.54 +ORGANIZER:mailto:paul.boddie@example.com
1.55 +ATTENDEE;ROLE=CHAIR:mailto:paul.boddie@example.com
1.56 +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
1.57 +}}}
1.58 +
1.59 +It makes most sense to choose a recipient acting as a resource so that an
1.60 +automated response may be generated with the sender receiving this response.
1.61 +However, other kinds of recipients may also be tested in this way.
1.62 +
1.63 +The result of this invocation will become known via the following sources of
1.64 +information:
1.65 +
1.66 + * The sender's mailbox (if the recipient sends an automated response)
1.67 + * The sender's data store
1.68 + * The recipient's mailbox (if the recipient is configured to store mail)
1.69 + * The recipient's data store
1.70 + * Mail system logs (particularly in case of errors)
1.71 +
1.72 +See the [[../MailIntegration|mail integration guide]] for more information
1.73 +about configuring and troubleshooting mail systems.
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tools/sendmail.py Sun Apr 03 23:21:31 2016 +0200
2.3 @@ -0,0 +1,9 @@
2.4 +#!/usr/bin/env python
2.5 +
2.6 +import smtplib
2.7 +import sys
2.8 +
2.9 +sender, recipients = sys.argv[1], sys.argv[2:]
2.10 +
2.11 +s = smtplib.SMTP("localhost")
2.12 +print s.sendmail(sender, recipients, sys.stdin.read())