[Asterisk-code-review] testsuite: Added testcase for channels/{channelId}/rtp_statistics (...testsuite[master])
sungtae kim
asteriskteam at digium.com
Mon Mar 25 19:15:27 CDT 2019
sungtae kim has uploaded this change for review. ( https://gerrit.asterisk.org/c/testsuite/+/11178
Change subject: testsuite: Added testcase for channels/{channelId}/rtp_statistics
......................................................................
testsuite: Added testcase for channels/{channelId}/rtp_statistics
Added basic testcase for rtp_statistics.
Change-Id: Ie41127219a4fccc183f9374fbcb768835a7d2bb2
---
A tests/rest_api/channels/rtp_statistics/basic/configs/ast1/extensions.conf
A tests/rest_api/channels/rtp_statistics/basic/test-config.yaml
2 files changed, 122 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/78/11178/1
diff --git a/tests/rest_api/channels/rtp_statistics/basic/configs/ast1/extensions.conf b/tests/rest_api/channels/rtp_statistics/basic/configs/ast1/extensions.conf
new file mode 100644
index 0000000..59c7f03
--- /dev/null
+++ b/tests/rest_api/channels/rtp_statistics/basic/configs/ast1/extensions.conf
@@ -0,0 +1,6 @@
+[default]
+
+exten => s,1,NoOp()
+ same => n,Answer()
+ same => n,Echo()
+ same => n,Hangup()
diff --git a/tests/rest_api/channels/rtp_statistics/basic/test-config.yaml b/tests/rest_api/channels/rtp_statistics/basic/test-config.yaml
new file mode 100644
index 0000000..12d4be4
--- /dev/null
+++ b/tests/rest_api/channels/rtp_statistics/basic/test-config.yaml
@@ -0,0 +1,116 @@
+
+testinfo:
+ summary: 'Test rtp_statistics'
+ description: |
+ * Originate a channel
+ * Playback an audio file
+ * Get rtp statistics
+ * Pause it
+ * Unpause it
+ * Rewind it
+ * Delete the playback
+ * Delete the channel
+ * Validate all the events
+
+properties:
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - python : starpy
+ - asterisk : res_ari_channels
+ - asterisk : app_echo
+ tags:
+ - ARI
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: ari.AriOriginateTestObject
+ modules:
+ -
+ config-section: ari-config
+ typename: ari.WebSocketEventModule
+ -
+ config-section: ari-test-stopper
+ typename: pluggable_modules.EventActionModule
+
+test-object-config:
+ stop-on-end: False
+
+ari-test-stopper:
+ -
+ ari-events:
+ match:
+ type: ChannelDestroyed
+ application: testsuite
+ channel:
+ id: 'testsuite-default-id$'
+ stop_test:
+
+ari-config:
+ apps: testsuite
+ events:
+ -
+ conditions:
+ match:
+ type: 'ChannelStateChange'
+ count: '>1'
+ -
+ conditions:
+ match:
+ type: StasisStart
+ application: testsuite
+ channel:
+ id: 'testsuite-default-id$'
+ count: 1
+ requests:
+ method: 'post'
+ uri: 'channels/testsuite-default-id/play/MyPlaybackId'
+ params:
+ media: 'sound:silence/5'
+ -
+ conditions:
+ match:
+ type: PlaybackStarted
+ application: testsuite
+ playback:
+ id: 'MyPlaybackId'
+ target_uri: 'channel:testsuite-default-id$'
+ count: 2
+ requests:
+ -
+ instance: 1
+ delay: 1
+ method: 'get'
+ uri: 'rtp_statistics'
+ -
+ conditions:
+ match:
+ type: PlaybackFinished
+ application: testsuite
+ playback:
+ target_uri: 'channel:testsuite-default-id$'
+ count: 1
+ requests:
+ # playback is already deleted
+ method: 'delete'
+ uri: 'channels/testsuite-default-id'
+ -
+ conditions:
+ match:
+ type: ChannelHangupRequest
+ application: testsuite
+ channel:
+ id: 'testsuite-default-id$'
+ count: 1
+
+ -
+ conditions:
+ match:
+ type: StasisEnd
+ application: testsuite
+ channel:
+ id: 'testsuite-default-id$'
+ count: 1
+
--
To view, visit https://gerrit.asterisk.org/c/testsuite/+/11178
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Change-Id: Ie41127219a4fccc183f9374fbcb768835a7d2bb2
Gerrit-Change-Number: 11178
Gerrit-PatchSet: 1
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190325/1cc2aa60/attachment.html>
More information about the asterisk-code-review
mailing list