mojolingo / sippy_cup

Create SIP load test scenarios the easy way
http://mojolingo.github.io/sippy_cup
MIT License
218 stars 78 forks source link

Authorized 'register' doesn't seem to work #45

Closed leifmadsen closed 10 years ago

leifmadsen commented 10 years ago

Was playing around yesterday, and no matter how things were setup, the system would not setup a REGISTER with authorization.

If the configuration in the yml file was like so:

register: 'sip:user@foobar', 'my_secret_password'

The REGISTER would just have the full string in the REGISTER line. It's like it isn't being parsed.

The documentation says to separate with a space, but the development code seems to show separation with a comma in the configuration. Either way, the password just appears in the REGISTER line.

wdrexler commented 10 years ago

Hey Leif,

At present, YAML manifests don't allow for method calls with multiple arguments. We're hoping to change this in the near future, but for now, you're going to have to use a Ruby script to get that functionality. Something like:

require 'sippy_cup'
scenario = SippyCup::Scenario.new 'My Scenario' do |s|
  s.register 'sip:user@foobar', 'my_secret_password'
  ...
end
scenario.compile!

I'm thinking multiple arguments in the YAML will either look something like this:

---
steps:
  register:
    - "sip:user@foobar"
    - "my_secret_password"

Or something like this:

---
steps:
  - register "sip:user@foobar", "my_secret_password"

Either way, our argument parser needs a little bit of love, but for now, a Ruby script should give you what you need. Tagging @bklang for thoughts.

leifmadsen commented 10 years ago

Ah thanks! I misunderstood then that it would work from the yaml file.

This issue can either be retagged/logged as a feature request for enhancement to the yaml parser, or closed. Thanks!

benlangfeld commented 10 years ago

Closing in favour of #53