Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full test coverage and API documentation #34

Merged
merged 27 commits into from
Sep 17, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a82b565
Remove some unused requires
benlangfeld Sep 17, 2013
57e2304
Avoid referring to manifests by their format (YAML), but instead by t…
benlangfeld Sep 17, 2013
4a6f74e
Fix some documentation
benlangfeld Sep 17, 2013
3f641ad
Add documentation for basic Scenario initialization
benlangfeld Sep 17, 2013
b5cd6fe
Remove some methods from the Scenario public API
benlangfeld Sep 17, 2013
5c44dec
Add markers for better test coverage
benlangfeld Sep 17, 2013
f99c2ec
Reduce spec duplication
benlangfeld Sep 17, 2013
9f802b3
Simple sting quoting
benlangfeld Sep 17, 2013
a1df218
Remove unsafe symbolisation of untrusted input
benlangfeld Sep 17, 2013
73e7e2e
Use safer heredocs
benlangfeld Sep 17, 2013
f9d4515
Switch incorrect logging
benlangfeld Sep 17, 2013
42c0e3c
Ditch 'should' from test descriptions
benlangfeld Sep 17, 2013
895d2f7
This simple test shouldn't care about invites
benlangfeld Sep 17, 2013
bb29167
Flesh out invite specs
benlangfeld Sep 17, 2013
844b1a5
Fix static RTCP port in SDP
benlangfeld Sep 17, 2013
b1353f9
Use deeper tests for REGISTER
benlangfeld Sep 17, 2013
f51ef0f
Clean up REGISTER code
benlangfeld Sep 17, 2013
910ed52
Rearrange specs
benlangfeld Sep 17, 2013
955faa0
Add specs for all elements of call setup in Scenarios
benlangfeld Sep 17, 2013
118917e
Add specs for all elements of call teardown in Scenarios
benlangfeld Sep 17, 2013
1ee214d
Rearrange to group mid-call operations together
benlangfeld Sep 17, 2013
0b0d5de
Expand specs for and straighten up implementation of sleep DTMF in sc…
benlangfeld Sep 17, 2013
0a395e0
Add specs for scenario compilation
benlangfeld Sep 17, 2013
10d9742
Do away with an unnecessary instance variable
benlangfeld Sep 17, 2013
1108263
Simplify the implementation of repeatedly sending messages
benlangfeld Sep 17, 2013
bea297f
Flesh out API documentation on Scenario
benlangfeld Sep 17, 2013
8879cec
Turns out the rubinius build isn't stable enough
benlangfeld Sep 17, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ matrix:
allow_failures:
- rvm: 2.0.0
- rvm: jruby-19mode
- rvm: rbx-19mode
- rvm: ruby-head
notifications:
irc: "irc.freenode.org#adhearsion"
10 changes: 5 additions & 5 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Each command below can take [SIPp attributes](http://sipp.sourceforge.net/doc/re

Don't want your scenario to end up in the same directory as your script? Need the filename to be different than the scenario name? No problem!

For the `sippy_cup` YAML specification, use `scenario`:
For the `sippy_cup` manifest, use `scenario`:

```YAML
---
Expand All @@ -171,17 +171,17 @@ scenario: /path/to/scenario.xml
Or, in Ruby:

```Ruby
my_opts = { source: '192.168.5.5:10001', destination: '10.10.0.3:19995', filename: '/path/to/somewhere' }
s = SippyCup::Scenario.new 'SippyCup', my_opts do
s = SippyCup::Scenario.new 'SippyCup', source: '192.168.5.5:10001', destination: '10.10.0.3:19995', filename: '/path/to/somewhere' do
# scenario definitions here...
end
s.compile!
```

This will create the files `somewhere.xml`, `somewhere.pcap`, and `somewhere.yml` in the `/path/to/` directory.
This will create the files `somewhere.xml` and `somewhere.pcap` in the `/path/to/` directory.

### Customizing the Test Run

Each parameter has an impact on the test, and may either be changed once the YAML file is generated or specified in the options hash for `SippyCup::Scenario.new`. In addition to the default parameters, some additional parameters can be set:
Each parameter has an impact on the test, and may either be changed once the XML file is generated or specified in the options hash for `SippyCup::Scenario.new`. In addition to the default parameters, some additional parameters can be set:
<dl>
<dt>stats_file</dt>
<dd>Path to a file where call statistics will be stored in a CSV format, defaults to not storing stats</dd>
Expand Down
2 changes: 1 addition & 1 deletion bin/sippy_cup
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require 'getoptlong'
def usage
puts "#{$0} [OPTS] </path/to/sippy_cup_definition.yml>"
puts
puts "--compile, -c Compile the given scenario YAML to XML and PCAP"
puts "--compile, -c Compile the given scenario manifest to XML and PCAP"
puts "--run, -r Run the scenario. If used without -c, must supply a previously"
puts " compiled SippyCup file"
puts "--help, -h Print this usage information"
Expand Down
1 change: 0 additions & 1 deletion lib/sippy_cup/runner.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'yaml'
require 'logger'
require 'active_support/core_ext/hash'

Expand Down
Loading