Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
Nicolas Sebrecht edited this page Apr 6, 2016 · 1 revision

Comedy

Comedy aims at writing story-based tests easily. IOW, comedy would fake an IMAP server, returning semi-static responses on IMAP commands. Implementing a full IMAP server is definetly not the goal. Everything should happen in RAM.

Using a DSL would allow both easy and flexible usage. For example:

context = Comedy.createContext()
context.createUser('name', 'password')
context.add('INBOX', message1)
context.add('INBOX', message2)
context.addMailbox('INBOX/archives')

While testing, variants for a context should be made easy.

context2 = context.duplicate()
context2.setMailbox('INBOX/archives', readOnly=True)

Playing stories:

Comedy.run('syncAccounts -a AccountA')
  • Adventure: play a story (imapfw -r story.rascal Adventure COMEDY_FILE).
Clone this wiki locally