summaryrefslogtreecommitdiff
path: root/pjsip-apps/src/test-pjsua/inc_param.py
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-06-12 15:37:22 +0000
committerBenny Prijono <bennylp@teluu.com>2008-06-12 15:37:22 +0000
commite5c47747a5355a29b5184ed690d05c241f1bd34e (patch)
tree6ccd15b80ddbcdc7920d6d451b267378a5695490 /pjsip-apps/src/test-pjsua/inc_param.py
parent33a19f0c14777cd7e2923e9eb1f355547fbee3cc (diff)
Ticket #543: initial framework for pjsua testing, still needs lots of test scenarios
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2009 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/test-pjsua/inc_param.py')
-rw-r--r--pjsip-apps/src/test-pjsua/inc_param.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/pjsip-apps/src/test-pjsua/inc_param.py b/pjsip-apps/src/test-pjsua/inc_param.py
new file mode 100644
index 00000000..e897d140
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/inc_param.py
@@ -0,0 +1,46 @@
+# $Id$
+###########################################
+# pjsua instantiation parameter
+class Pjsua:
+ # instance name
+ name = ""
+ # command line arguments. Default is empty.
+ # sample:
+ # args = "--null-audio --local-port 0"
+ args = ""
+ # list containing send/expect/title list. Default empty.
+ # The inside list contains three items, all are optional:
+ # - the command to be sent to pjsua menu
+ # - the string to expect
+ # - optional string to describe what this is doing
+ # Sample of command list containing two list items:
+ # cmds = [["sleep 50",""], ["q","", "quitting.."]]
+ cmds = []
+ # print out the stdout output of this pjsua?
+ echo = False
+ # print out commands interacting with this pjsua?
+ trace = False
+ def __init__(self, name, args="", echo=False, trace=False, cmds=[]):
+ self.name = name
+ self.args = args
+ self.echo = echo
+ self.trace = trace
+ self.cmds = cmds
+
+############################################
+# Test parameter class
+class Test:
+ title = ""
+ # params is list containing PjsuaParam objects
+ run = []
+ # list of Expect instances, to be filled at run-time by
+ # the test program
+ process = []
+ # the function for test body
+ test_func = None
+ def __init__(self, title, run, func=None):
+ self.title = title
+ self.run = run
+ self.test_func = func
+
+