[svn-commits] mmichelson: branch mmichelson/bridge-tests r3370 - in /asterisk/team/mmichels...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 26 16:02:36 CDT 2012


Author: mmichelson
Date: Thu Jul 26 16:02:34 2012
New Revision: 3370

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3370
Log:
Remove some unused variables from the bridge test case and add a sample configuration file.


Added:
    asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample   (with props)
Modified:
    asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py

Modified: asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py?view=diff&rev=3370&r1=3369&r2=3370
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py (original)
+++ asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py Thu Jul 26 16:02:34 2012
@@ -37,7 +37,6 @@
     1 : the unit from which calls originate, also known as "Alice"
     2 : the unit where calls terminate, also known as "Bob"
     '''
-
     def __init__(self, test_path = '', test_config = None):
         TestCase.__init__(self, test_path)
         self.create_asterisk(3, "%s/configs/bridge" % os.getcwd())
@@ -110,10 +109,6 @@
         self.bob_channel = None
         self.uut_alice_channel = None
         self.uut_bob_channel = None
-        self.alice_connected = False
-        self.bob_connected = False
-        self.alice_dtmf = False
-        self.bob_dtmf = False
         self.alice_hungup = False
         self.bob_hungup = False
         self.current_feature = 0
@@ -131,21 +126,19 @@
     def user_callback(self, ami, event):
         if (event.get('userevent') == 'Connected'):
             if ami is self.ami_bob:
-                self.bob_connected = True
                 self.bob_channel = event.get('channel')
                 LOGGER.info("Bob's channel is %s" % self.bob_channel)
             elif ami is self.ami_alice:
-                self.alice_connected = True
                 self.alice_channel = event.get('channel')
                 LOGGER.info("Alice's channel is %s" % self.alice_channel)
 
         if (event.get('userevent') == 'TalkDetect'):
             if event.get('result') == 'pass':
-                LOGGER.info("Audio be good")
+                LOGGER.info("Two way audio properly detected between Bob and Alice")
                 self.audio_detected = True
                 self.check_identities()
             else:
-                LOGGER.info("AUDIO SUCK!")
+                LOGGER.info("Audio issues on bridged call")
                 self.stop_reactor()
 
     def hangup_callback(self, ami, event):
@@ -279,7 +272,7 @@
 
     def send_hangup(self):
         if not self.hangup:
-            LOGGER.info("No hangup set. Hang up will happen elsewhere")
+            LOGGER.info("No hangup set. Hang up will happen externally")
             return
 
         LOGGER.info("Sending a hangup to %s" % self.hangup)

Added: asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample?view=auto&rev=3370
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample (added)
+++ asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample Thu Jul 26 16:02:34 2012
@@ -1,0 +1,84 @@
+#Same configuration for the bridge test object
+
+# Configuration for the bridging test object works
+# the same as for any other. In the test-modules section,
+# specify where its configuration is found and the name of
+# the test object.
+test-modules:
+    test-object:
+        config-section: bridge-config
+        typename: 'BridgeTestCase.BridgeTestCase'
+
+# The bridging test object works by using three Asterisk
+# instances.
+#
+# Asterisk instance 0: The UUT. This is where the actual
+# bridge will be.
+#
+# Asterisk instance 1: "Alice". This is the originator of
+# calls that go through the UUT.
+#
+# Asterisk instance 2: "Bob". This is the receiver of calls
+# that go through the UUT.
+#
+# The configuration for the UUT, Alice, and Bob is located in configs/bridge/ast1,
+# configs/bridge/ast2, and configs/bridge/ast3 respectively. This way every test
+# that uses the bridge test object can rely on the same configuration being
+# used. Configuration for individual tests can be specified within the test
+# directory. It will be common to write a custom extensions.conf file for the UUT
+# for every test.
+bridge-config:
+
+	# Each item in the bridge configuration indicates a call
+	# from Alice to Bob.
+    -
+		# The extension in the UUT for Alice to call. All calls are
+		# directed to the "default" context
+        extension: 'alice_atxfer'
+
+		# Once the call has been established, what features should be
+		# executed? Each item in this list represents a feature to be
+		# executed.
+        features:
+            -
+				# Who should be the originator of the feature? This must
+				# be either "alice" or "bob"
+                who: 'bob'
+
+				# What feature should be executed? This must be either
+				# - atxfer
+				# - blindxfer
+				# - disconnect
+				# - automon
+				# - automixmon
+				# - parkcall
+                what: 'atxfer'
+
+				# Whether we expect the feature to succeed. "Success" in this
+				# case simply means that the feature is detected by the bridge
+				# and farmed off to a handler function. For the purposes of bridge
+				# testing, we do not check if the feature actually works. The most
+				# common cause for a feature not to succeed is because the party
+				# attempting to use the feature does not have permission to do so.
+                success: 'false'
+            -
+                who: 'alice'
+                what: 'atxfer'
+                success: 'true'
+
+		# Which party should hang up the call? This option can be omitted if
+		# the hangup should originate from an external source or if one of the
+		# listed features should result in a hangup.
+        hangup: 'alice'
+    -
+        extension: 'bob_atxfer'
+        hangup: 'alice'
+        features:
+            -
+                who: 'alice'
+                what: 'atxfer'
+                success: 'false'
+            -
+                who: 'bob'
+                what: 'atxfer'
+                success: 'true'

Propchange: asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the svn-commits mailing list