[asterisk-dev] [Code Review] Test for app_voicemail's VoiceMailMain that exercises new TestEvent AMI event
Paul Belanger
reviewboard at asterisk.org
Fri Aug 19 10:19:13 CDT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1363/#review4098
-----------------------------------------------------------
As discussed on #asterisk-dev, I think we'll benefit changing our the print command for the Python logging class.
I've also added a few notes. In the process of testing this now.
/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/extensions.conf
<https://reviewboard.asterisk.org/r/1363/#comment8050>
We should avoid using Wait() in the dialplan.
/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/run-test
<https://reviewboard.asterisk.org/r/1363/#comment8048>
invert code block. EG: Have large block on top.
/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/run-test
<https://reviewboard.asterisk.org/r/1363/#comment8049>
Maybe we should turn the state values into constants within the VoiceMailState class.
- Paul
On Aug. 16, 2011, 4:55 p.m., mjordan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1363/
> -----------------------------------------------------------
>
> (Updated Aug. 16, 2011, 4:55 p.m.)
>
>
> Review request for Asterisk Developers, David Vossel and Paul Belanger.
>
>
> Summary
> -------
>
> This review is part 2 of 2. It demonstrates writing a test in the Asterisk Test Suite that takes advantage of the TestEvent in Asterisk to exercise functionality in a complex application. The test does the following:
>
> 1. Calls into VoiceMailMain and enters a password (optionally, it would also do a user mailbox, but the dialplan takes care of that. The test is 'smart enough' to recognize this)
> 2. Listens to an Urgent message, making sure that it hears the Urgent message first, then saves it to the old folder
> 3. Listens to two new messages, saving them to the old folder as well
> 4. Exits cleanly
>
> This involves triggering off a number of events returned from app_voicemail, telling the test where it is in the sequence of playing voice prompts and what menu it happens to be in. Since app_voicemail tends to recycle voice prompts in various places, the test 'helps itself' a few times, but by and large the states are driven completely off of what is being sent from the application itself.
>
>
> Diffs
> -----
>
> /asterisk/trunk/lib/python/asterisk/TestCase.py 1839
> /asterisk/trunk/lib/python/asterisk/TestState.py PRE-CREATION
> /asterisk/trunk/lib/python/asterisk/voicemail.py 1839
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/extensions.conf PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/manager.general.conf.inc PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/manager.users.conf.inc PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/sip.conf PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/voicemail.conf PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast2/extensions.conf PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast2/manager.general.conf.inc PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast2/manager.users.conf.inc PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast2/sip.conf PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/run-test PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/test-config.yaml PRE-CREATION
> /asterisk/trunk/tests/apps/voicemail/tests.yaml 1839
>
> Diff: https://reviewboard.asterisk.org/r/1363/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> mjordan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110819/37d7d922/attachment.htm>
More information about the asterisk-dev
mailing list