[asterisk-commits] jrose: testsuite/asterisk/trunk r4446 - in /asterisk/trunk/tests/apps: ./ say...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 13 14:18:14 CST 2013
Author: jrose
Date: Fri Dec 13 14:18:13 2013
New Revision: 4446
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4446
Log:
Testsuite/say_interrupt: Add a test for SAY_DTMF_INTERRUPT behavior
https://reviewboard.asterisk.org/r/3011/
Tests the functionality of this feature, both when set and not set
(issue AFS-16)
Review: https://reviewboard.asterisk.org/r/3018/
Added:
asterisk/trunk/tests/apps/say_interrupt/
asterisk/trunk/tests/apps/say_interrupt/configs/
asterisk/trunk/tests/apps/say_interrupt/configs/ast1/
asterisk/trunk/tests/apps/say_interrupt/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/apps/say_interrupt/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/apps/tests.yaml
Added: asterisk/trunk/tests/apps/say_interrupt/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/say_interrupt/configs/ast1/extensions.conf?view=auto&rev=4446
==============================================================================
--- asterisk/trunk/tests/apps/say_interrupt/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/say_interrupt/configs/ast1/extensions.conf Fri Dec 13 14:18:13 2013
@@ -1,0 +1,100 @@
+[say_without_interrupt]
+exten => test,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(2)
+ same => n,UserEvent(TestDTMF,DTMF: 1)
+ same => n,SayNumber(42355)
+ same => n,UserEvent(TestDTMF,DTMF: 2)
+ same => n,SayAlpha(betamax)
+ same => n,UserEvent(TestDTMF,DTMF: 3)
+ same => n,SayAlphaCase(u,Car)
+ same => n,UserEvent(TestDTMF,DTMF: 4)
+ same => n,SayDigits(54321)
+ same => n,UserEvent(TestDTMF,DTMF: 5)
+ same => n,SayPhonetic(abc)
+ same => n,UserEvent(TestDTMF,DTMF: 6)
+ same => n,SayUnixTime()
+ same => n,UserEvent(TestStatus,status: success)
+ same => n,Hangup()
+
+exten => 1,1,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 2,1,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 3,1,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 4,1,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 5,1,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 6,1,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+[say_with_interrupt]
+exten => test,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(2)
+ same => n,Set(SAY_DTMF_INTERRUPT=true)
+ same => n,UserEvent(TestDTMF,DTMF: 1)
+ same => n,SayNumber(42355)
+ same => n,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 1,1,UserEvent(TestDTMF,DTMF: 2)
+ same => n,SayAlpha(betamax)
+ same => n,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 2,1,UserEvent(TestDTMF,DTMF: 3)
+ same => n,SayAlphaCase(u,Car)
+ same => n,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 3,1,UserEvent(TestDTMF,DTMF: 4)
+ same => n,SayDigits(54321)
+ same => n,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 4,1,UserEvent(TestDTMF,DTMF: 5)
+ same => n,SayPhonetic(abc)
+ same => n,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 5,1,UserEvent(TestDTMF,DTMF: 6)
+ same => n,SayUnixTime()
+ same => n,UserEvent(TestStatus,status: failure)
+ same => n,Hangup()
+
+exten => 6,1,UserEvent(TestStatus,status: success)
+ same => n,Hangup()
+
+[default]
+exten => sendDTMF,1,NoOp()
+ same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+ same => n,SendDTMF(${DTMF_TO_SEND})
+ same => n,Goto(wait,1)
+
+exten => sendAudio,1,NoOp()
+ same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+ same => n,Playback(${TALK_AUDIO})
+ same => n,Goto(wait,1)
+
+exten => sendAudioWithDTMF,1,NoOp()
+ same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+ same => n,Playback(${TALK_AUDIO})
+ same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+ same => n,SendDTMF(${DTMF_TO_SEND})
+ same => n,Goto(wait,1)
+
+exten => hangup,1,NoOp()
+ same => n,Verbose(1, Hanging up)
+ same => n,Hangup()
+
+exten => wait,1,NoOp()
+ same => n,Wait(10000)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/apps/say_interrupt/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/say_interrupt/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/say_interrupt/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/say_interrupt/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/say_interrupt/test-config.yaml?view=auto&rev=4446
==============================================================================
--- asterisk/trunk/tests/apps/say_interrupt/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/say_interrupt/test-config.yaml Fri Dec 13 14:18:13 2013
@@ -1,0 +1,293 @@
+testinfo:
+ summary: 'Say Application tests for SAY_DTMF_INTERRUPT'
+ description: |
+ Tests all core say applications for the ability to jump via DTMF
+ when the SAY_DTMF_INTERRUPT option is set and unset
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'apptest.AppTest'
+
+test-object-config:
+ # SayNumber needs to be the first application in a given test to ensure DTMF is sent
+ app: 'SayNumber'
+ scenarios:
+ # Phase 0: Without the SAY_DTMF_INTERRUPT variable set
+ -
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestStatus'
+ Status: 'failure'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Phase 0: We jumped for some reason when we should not have jumped.'
+ channels:
+ -
+ channel-id: 'WithoutInterrupt'
+ channel-name: 'Local/test at say_without_interrupt'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestStatus'
+ Status: 'success'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 0 - Test Reached Completion Event'
+ -
+ action-type: 'end-scenario'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '1'
+ Channel: 'Local/test at say_without_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '1'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 0 - Test reached DTMF request 1/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '2'
+ Channel: 'Local/test at say_without_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '2'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 0 - Test reached DTMF request 2/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '3'
+ Channel: 'Local/test at say_without_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '3'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 0 - Test reached DTMF request 3/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '4'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '4'
+ Channel: 'Local/test at say_without_interrupt-.*'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 0 - Test reached DTMF request 4/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '5'
+ Channel: 'Local/test at say_without_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '5'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 0 - Test reached DTMF request 5/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '6'
+ Channel: 'Local/test at say_without_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '6'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 0 - Test reached DTMF request 6/6'
+
+ #Phase 1: With the SAY_DTMF_INTERRUPT variable set
+ -
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestStatus'
+ Status: 'failure'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Phase 1: We did not jump and we should have.'
+ channels:
+ -
+ channel-id: 'WithInterrupt'
+ channel-name: 'Local/test at say_with_interrupt'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestStatus'
+ Status: 'success'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 1 - Test Reached Completion Event'
+ -
+ action-type: 'end-scenario'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '1'
+ Channel: 'Local/test at say_with_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '1'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 1 - Test reached DTMF request 1/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '2'
+ Channel: 'Local/test at say_with_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '2'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 1 - Test reached DTMF request 2/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '3'
+ Channel: 'Local/test at say_with_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '3'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 1 - Test reached DTMF request 3/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '4'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '4'
+ Channel: 'Local/test at say_with_interrupt-.*'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 1 - Test reached DTMF request 4/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '5'
+ Channel: 'Local/test at say_with_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '5'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 1 - Test reached DTMF request 5/6'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestDTMF'
+ DTMF: '6'
+ Channel: 'Local/test at say_with_interrupt-.*'
+ actions:
+ -
+ action-type: 'send-dtmf'
+ delay: '1'
+ dtmf: '6'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 1 - Test reached DTMF request 6/6'
+
+
+properties:
+ minversion: '13.0.0'
+ tags:
+ - say
+ - apps
+ dependencies:
+ - buildoption: 'TEST_FRAMEWORK'
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'app_sayunixtime'
+ - asterisk : 'app_senddtmf'
+ - asterisk : 'app_playback'
+
Propchange: asterisk/trunk/tests/apps/say_interrupt/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/say_interrupt/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/say_interrupt/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/apps/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/tests.yaml?view=diff&rev=4446&r1=4445&r2=4446
==============================================================================
--- asterisk/trunk/tests/apps/tests.yaml (original)
+++ asterisk/trunk/tests/apps/tests.yaml Fri Dec 13 14:18:13 2013
@@ -15,3 +15,4 @@
- test: 'mixmonitor_func'
- dir: 'control_playback'
- dir: 'playback'
+ - test: 'say_interrupt'
More information about the asterisk-commits
mailing list