9. ADHEARSION
DICTATION CARRIER
APPLICATIONS CALL APPS
CENTERS
CUSTOMER
CRM
SUPPORT
ARE
TRANSLATION FUN
DISTRIBUTED
C O M M U N I C A T I O N S
S C H E D U L I N G AND
CONVERGENCE
USEFUL
19. Our goals for unit
testing:
- Confidence at the class level
20. Our goals for unit
testing:
- Confidence at the class level
- Prevent regression errors
21. Our goals for unit
testing:
- Confidence at the class level
- Prevent regression errors
- Promote proper code structure
22. Our goals for unit
testing:
- Confidence at the class level
- Prevent regression errors
- Promote proper code structure
- Provide CI with something to help
us with
24. Unit testing Ahn
apps
- Call Controllers are an application’s
core
25. Unit testing Ahn
apps
- Call Controllers are an application’s
core
- RSpec recommended
26. Unit testing Ahn
apps
- Call Controllers are an application’s
core
- RSpec recommended
- Mock at the controller level
27. Unit testing Ahn
apps
- Call Controllers are an application’s
core
- RSpec recommended
- Mock at the controller level
- Support classes are just Ruby!
31. Adding RSpec
- Generated apps are
Gemfile: RSpec ready
group :test do - Your choice of
gem 'rspec' mocking framework
end
- Just bundle
install
32. Spec File
require 'spec_helper'
describe DemoController do
let(:mock_call) { mock 'Call' }
subject do
DemoController.new mock_call
end
let(:dtmf) { "1" }
it "should answer, ask for a result, and say it" do
subject.should_receive(:answer).once
subject.should_receive(:ask).with("What is your favorite number?", :timeout =>
10000, :limit => 1).once.and_return(dtmf)
subject.should_receive(:say).with("Your favorite number seems to be #{dtmf}")
subject.run
end
end
33. Our controller
class DemoController < Adhearsion::CallController
def run
answer
result = ask "What is your favorite number?", :timeout =>
10000, :limit => 1
say "Your favorite number seems to be #{result}"
end
end
49. SIPp (seriously)
- http://sipp.sourceforge.net/
- Free and OSS Test tool and traffic
generator
- Can run XML scenarios defined by
the user
- Can play audio and interact
- Requires good knowledge of SIP
50. SIPp sample run
sudo sipp -sn uac -s 1 -l 10 -r 5 -m 100 127.0.0.1
- Built-in scenario
- Audio is PCAP, raw network capture
of an RTP session
- In custom scenarios, PCAP files are
built with Wireshark/tcpdump
- Ability to set call rate, concurrent
calls, maximum number of calls,
many other options
51. SIPp options
- -trace_err gives you an error log
- -trace_stat outputs a CSV report
- -rtp_echo echoes RTP back to the
source
- An XML scenario file can play PCAP,
pause, and perform general call
control
56. Loadbot scenario
config:
agi_server: 127.0.0.1
prefix: SIP/mycarrier
plans:
plan 1:
number: 1231231234
answers:
- 1
- Can be driven through DRb or
directly through the Ahn1 API
60. PJSUA at a glance
- Can make single or multiple
connection to SIP server
- Can auto-answer, play audio, and
record
- Suitable for test support
- Also is a handy tool for QoS
- Does not run a “true” scenario
64. Functional
takeaways
- Set a specific goal for each scenario
65. Functional
takeaways
- Set a specific goal for each scenario
- Take advantage of CDR and APIs to
do integration testing
66. Functional
takeaways
- Set a specific goal for each scenario
- Take advantage of CDR and APIs to
do integration testing
- Less automated than web functional
testing
79. Thank you!
http://mojolingo.com
https://github.com/polysics
Twitter: lucaprado
XMPP and Email: lpradovera@mojolingo.com
...and please...
NO MAKE KITTY SAD
80. Thank you!
http://mojolingo.com
https://github.com/polysics
Twitter: lucaprado
XMPP and Email: lpradovera@mojolingo.com
...and please...
NO MAKE KITTY SAD
...go rate my talk at
http:/spkr8.com/17421
Editor's Notes
\n
\n
\n
\n
\n
\n
all of those have been built with Adhearsion and are around now\n
\n
people get very angry when phone calls do not work. the same ancestral instincts that make voice our best tool to communicate makes users react very badly when something goes wrong.\n
of course not the only ones\n
\n
\n
of course unit testing and TDD have another million good reasons\n
of course unit testing and TDD have another million good reasons\n
of course unit testing and TDD have another million good reasons\n
of course unit testing and TDD have another million good reasons\n
\n
\n
\n
\n
configure RSpec in spec_helper as usual. Guard is recommended too.\n
configure RSpec in spec_helper as usual. Guard is recommended too.\n
configure RSpec in spec_helper as usual. Guard is recommended too.\n
kept it as simple as possible. how many in the audience are familiar with rspec?\n
how many are familiar with adhearsion 2 controllers? explain if not many\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
let&#x2019;s see what we know about sipp\n
let&#x2019;s see what we know about sipp\n
\n
Command line does not fit on screen.\n
\n
\n
\n
Ahn can also be a client\nSuitable for anything but load testing Adhearsion itself\n