[asterisk-commits] file: testsuite/asterisk/trunk r4924 - in /asterisk/trunk/tests/apps: ./ disa...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 1 10:30:18 CDT 2014


Author: file
Date: Tue Apr  1 10:30:11 2014
New Revision: 4924

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4924
Log:
Test that the DISA application works as advertised.

(closes issue ASTERISK-23521)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3400/

Added:
    asterisk/trunk/tests/apps/disa/
    asterisk/trunk/tests/apps/disa/nominal/
    asterisk/trunk/tests/apps/disa/nominal/authenticate/
    asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/
    asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/ast1/
    asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/disa/nominal/authenticate/test-config.yaml   (with props)
    asterisk/trunk/tests/apps/disa/nominal/tests.yaml   (with props)
    asterisk/trunk/tests/apps/disa/tests.yaml   (with props)
Modified:
    asterisk/trunk/tests/apps/tests.yaml

Added: asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/ast1/extensions.conf?view=auto&rev=4924
==============================================================================
--- asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/ast1/extensions.conf Tue Apr  1 10:30:11 2014
@@ -1,0 +1,47 @@
+; Tests the DISA application to see if the authentication works as intended.
+
+[default]
+
+; ----------------------------------------------------------------------
+; ***Required***
+; ----------------------------------------------------------------------
+[default]
+exten => sendDTMF,1,NoOp()
+    same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+    same => n,SendDTMF(${DTMF_TO_SEND})
+    same => n,Goto(default,wait,1)
+
+exten => sendAudio,1,NoOp()
+    same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+    same => n,Playback(${TALK_AUDIO})
+    same => n,Goto(default,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(default,wait,1)
+
+exten => hangup,1,NoOp()
+    same => n,Verbose(1, Hanging up)
+    same => n,Hangup()
+
+exten => wait,1,NoOp()
+    same => n,Wait(10000)
+
+; ----------------------------------------------------------------------
+; Test extensions.
+; ----------------------------------------------------------------------
+
+exten => start,1,NoOp()
+    same => n,Answer()
+    same => n,DISA(1234,default)
+
+exten => 100,1,NoOp()
+    same => n,UserEvent(TestResult,result:pass)
+    same => n,Hangup()
+
+exten => i,1,NoOp()
+    same => n,UserEvent(TestResult,result:fail)
+    same => n,Hangup()

Propchange: asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/disa/nominal/authenticate/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/disa/nominal/authenticate/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/nominal/authenticate/test-config.yaml?view=auto&rev=4924
==============================================================================
--- asterisk/trunk/tests/apps/disa/nominal/authenticate/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/disa/nominal/authenticate/test-config.yaml Tue Apr  1 10:30:11 2014
@@ -1,0 +1,77 @@
+test-info:
+    summary: 'Tests that the DISA applciation with authentication is working correctly.'
+    description:
+        This test has a local channel enter the DISA application, enter in the authentication,
+        enter the desired extension, and sends it to that extension.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'apptest.AppTest'
+
+test-object-config:
+  app: 'DISA'
+  scenarios:
+    -
+      # Scenario 1
+      # Goes through the steps in the description above.
+      channels:
+        -
+          channel-id: 'DISA-Channel'
+          channel-name: 'Local/start at default'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Newexten'
+                  Application: 'DISA'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel entered DISA application'
+                -
+                  action-type: 'send-dtmf'
+                  delay: 1
+                  dtmf: '1234#100'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'UserEvent'
+                  UserEvent: 'TestResult'
+              requirements:
+                match:
+                  Result: 'pass'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel entered extension successfully!'
+                -
+                  action-type: 'hangup'
+                -
+                  action-type: 'end-scenario'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'UserEvent'
+                  UserEvent: 'TestResult'
+                  Result: 'fail'
+              actions:
+                -
+                  action-type: 'fail-test'
+                  message: 'Channel did not enter extension. Test failed'
+
+properties:
+    minversion: '1.8.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - asterisk : 'app_userevent'
+    tags:
+        - apps
+        - disa

Propchange: asterisk/trunk/tests/apps/disa/nominal/authenticate/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/disa/nominal/authenticate/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/disa/nominal/authenticate/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/disa/nominal/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/nominal/tests.yaml?view=auto&rev=4924
==============================================================================
--- asterisk/trunk/tests/apps/disa/nominal/tests.yaml (added)
+++ asterisk/trunk/tests/apps/disa/nominal/tests.yaml Tue Apr  1 10:30:11 2014
@@ -1,0 +1,3 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'authenticate'

Propchange: asterisk/trunk/tests/apps/disa/nominal/tests.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/disa/nominal/tests.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/disa/nominal/tests.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/disa/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/tests.yaml?view=auto&rev=4924
==============================================================================
--- asterisk/trunk/tests/apps/disa/tests.yaml (added)
+++ asterisk/trunk/tests/apps/disa/tests.yaml Tue Apr  1 10:30:11 2014
@@ -1,0 +1,3 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - dir: 'nominal'

Propchange: asterisk/trunk/tests/apps/disa/tests.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/disa/tests.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/disa/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=4924&r1=4923&r2=4924
==============================================================================
--- asterisk/trunk/tests/apps/tests.yaml (original)
+++ asterisk/trunk/tests/apps/tests.yaml Tue Apr  1 10:30:11 2014
@@ -18,3 +18,4 @@
     - dir: 'playback'
     - test: 'say_interrupt'
     - test: 'channel_redirect'
+    - dir: 'disa'




More information about the asterisk-commits mailing list