[svn-commits] jrose: testsuite/asterisk/trunk r4422 - in /asterisk/trunk/tests/apps: ./ pag...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Dec 9 16:27:13 CST 2013
Author: jrose
Date: Mon Dec 9 16:27:11 2013
New Revision: 4422
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4422
Log:
testsuite: Add tests for app_page predial handlers
(issue AFS-14)
Review: https://reviewboard.asterisk.org/r/3053/
Added:
asterisk/trunk/tests/apps/page/page_baseline/
asterisk/trunk/tests/apps/page/page_baseline/configs/
- copied from r4407, asterisk/trunk/tests/apps/page/configs/
asterisk/trunk/tests/apps/page/page_baseline/run-test
- copied unchanged from r4407, asterisk/trunk/tests/apps/page/run-test
asterisk/trunk/tests/apps/page/page_baseline/test-config.yaml
- copied unchanged from r4407, asterisk/trunk/tests/apps/page/test-config.yaml
asterisk/trunk/tests/apps/page/page_predial/
asterisk/trunk/tests/apps/page/page_predial/configs/
asterisk/trunk/tests/apps/page/page_predial/configs/ast1/
asterisk/trunk/tests/apps/page/page_predial/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/apps/page/page_predial/test-config.yaml (with props)
asterisk/trunk/tests/apps/page/tests.yaml (with props)
Removed:
asterisk/trunk/tests/apps/page/configs/
asterisk/trunk/tests/apps/page/run-test
asterisk/trunk/tests/apps/page/test-config.yaml
Modified:
asterisk/trunk/tests/apps/tests.yaml
Added: asterisk/trunk/tests/apps/page/page_predial/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/page/page_predial/configs/ast1/extensions.conf?view=auto&rev=4422
==============================================================================
--- asterisk/trunk/tests/apps/page/page_predial/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/page/page_predial/configs/ast1/extensions.conf Mon Dec 9 16:27:11 2013
@@ -1,0 +1,60 @@
+[test]
+exten => test_pagee1,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-weasels)
+
+exten => test_pagee2,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-weasels)
+ same => n,Hangup()
+
+exten => predial_handler,1,NoOp()
+ same => n,UserEvent(UserPredial)
+ same => n,Return(0)
+
+[page]
+exten => standard,1,NoOp()
+ same => n,Answer()
+ same => n,Page(Local/test_pagee1 at test)
+ same => n,Hangup()
+
+exten => predial_caller,1,NoOp()
+ same => n,Answer()
+ same => n,Page(Local/test_pagee1 at test,B(test^predial_handler^1))
+ same => n,Hangup()
+
+exten => predial_callee,1,NoOp()
+ same => n,Answer()
+ same => n,Page(Local/test_pagee1 at test,b(test^predial_handler^1))
+ same => n,Hangup()
+
+exten => predial_callee_multiple,1,NoOp()
+ same => n,Answer()
+ same => n,Page(Local/test_pagee1 at test&Local/test_pagee2 at test,b(test^predial_handler^1))
+ 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)
Propchange: asterisk/trunk/tests/apps/page/page_predial/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/page/page_predial/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/page/page_predial/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/page/page_predial/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/page/page_predial/test-config.yaml?view=auto&rev=4422
==============================================================================
--- asterisk/trunk/tests/apps/page/page_predial/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/page/page_predial/test-config.yaml Mon Dec 9 16:27:11 2013
@@ -1,0 +1,186 @@
+testinfo:
+ summary: 'Test that predial handlers execute with Page options (b/B).'
+ description: |
+ Tests that predial handlers are executed on the appropriate channels
+ when predial handlers are set with the predial handler options for
+ the Page application. The following scenarios are tested.
+ * No predial handlers are applied (Just check that the channels are
+ bridged)
+ * A predial handler is applied to the caller channel
+ * A predial handler is applied to the callee channel
+ * A predial handler is applied to callee channels and two channels
+ will be dialed by Page
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'apptest.AppTest'
+
+test-object-config:
+ app: 'Page'
+ scenarios:
+ # Phase 0: Baseline
+ -
+ channels:
+ -
+ channel-id: 'baseline'
+ channel-name: 'Local/standard at page'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeNumChannels: '2'
+ ChannelStateDesc: 'Up'
+ actions:
+ -
+ action-type: 'hangup'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 0 - All channels entered bridge. Hang up on bridge'
+ -
+ action-type: 'end-scenario'
+
+ #Phase 1: Predial Caller
+ -
+ channels:
+ -
+ channel-id: 'pd-caller'
+ channel-name: 'Local/predial_caller at page'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'UserPredial'
+ Channel: 'Local/predial_caller at page-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 1 - Received Predial Event for Caller Channel.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeNumChannels: '2'
+ ChannelStateDesc: 'Up'
+ actions:
+ -
+ action-type: 'hangup'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 1 - All channels entered bridge. Hang up on bridge'
+ -
+ action-type: 'end-scenario'
+
+ #Phase 2: Predial Callee (single channel)
+ -
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'UserPredial'
+ Channel: 'Local/test_pagee1 at test-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 2 - Received Predial Event for Callee Channel.'
+
+ channels:
+ -
+ channel-id: 'pd-callee'
+ channel-name: 'Local/predial_callee at page'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeNumChannels: '2'
+ ChannelStateDesc: 'Up'
+ actions:
+ -
+ action-type: 'hangup'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 2 - All channels entered bridge. Hang up on bridge'
+ -
+ action-type: 'end-scenario'
+
+ #Phase 3: Predial Callee (multiple channels)
+ -
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'UserPredial'
+ Channel: 'Local/test_pagee1 at test-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 3 - Received Predial Event for Callee Channel (1 of 2).'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'UserPredial'
+ Channel: 'Local/test_pagee2 at test-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 3 - Received Predial Event for Callee Channel (2 of 2).'
+
+ channels:
+ -
+ channel-id: 'pd-callee-mult'
+ channel-name: 'Local/predial_callee_multiple at page'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeNumChannels: '3'
+ ChannelStateDesc: 'Up'
+ actions:
+ -
+ action-type: 'hangup'
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Phase 3 - All channels entered bridge. Hang up on bridge'
+ -
+ action-type: 'end-scenario'
+
+properties:
+ minversion: '13.0.0'
+ tags:
+ - apps
+ - page
+ dependencies:
+ - buildoption: 'TEST_FRAMEWORK'
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'app_page'
+ - asterisk : 'app_senddtmf'
+ - asterisk : 'app_playback'
+
Propchange: asterisk/trunk/tests/apps/page/page_predial/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/page/page_predial/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/page/page_predial/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/page/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/page/tests.yaml?view=auto&rev=4422
==============================================================================
--- asterisk/trunk/tests/apps/page/tests.yaml (added)
+++ asterisk/trunk/tests/apps/page/tests.yaml Mon Dec 9 16:27:11 2013
@@ -1,0 +1,4 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+ - test: 'page_baseline'
+ - test: 'page_predial'
Propchange: asterisk/trunk/tests/apps/page/tests.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/page/tests.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/page/tests.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=4422&r1=4421&r2=4422
==============================================================================
--- asterisk/trunk/tests/apps/tests.yaml (original)
+++ asterisk/trunk/tests/apps/tests.yaml Mon Dec 9 16:27:11 2013
@@ -6,7 +6,7 @@
- dir: 'voicemail'
- dir: 'incomplete'
- dir: 'confbridge'
- - test: 'page'
+ - dir: 'page'
- dir: 'chanspy'
- dir: 'queues'
- test: 'directed_pickup'
More information about the svn-commits
mailing list