twiliotwilio-apiloadrunnervugen

How to use twilio rest api with loadrunner?


I am currently doing POC(proof of concept) on IVR loadtesting where I just want to call a IVR and have no interest in sound quality and all. So I come across twilio rest api which can make a outbound call.

It is working perfectly with python but I want to use it with loadrunner as it support rest api. I searched for twilio api urls and key value combinations. but hard luck for this. can anyone provide me the required URL and key value arrangement. or can guide me how to get those.

thanks in advance.


Solution

  • The documentation, Making Calls, has some code examples and example responses. You can make an API call using Postman (POST via x-www-form-urlencoded) and see the key:value pairs in the returned JSON, as shown below. API Explorer in Twilio Console is also useful for that.

    {
    "date_updated": null,
    "price_unit": "USD",
    "parent_call_sid": null,
    "caller_name": null,
    "duration": null,
    "from": "+15095550100",
    "to": "+14075550100",
    "annotation": null,
    "answered_by": null,
    "sid": "CAaacc78574ae1b9d2bf483f0123456789",
    "queue_time": "0",
    "price": null,
    "api_version": "2010-04-01",
    "status": "queued",
    "direction": "outbound-api",
    "start_time": null,
    "date_created": null,
    "from_formatted": "(509) 555-0100",
    "group_sid": null,
    "trunk_sid": null,
    "forwarded_from": null,
    "uri": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789.json",
    "account_sid": "ACdeca5d479509eeb8beaba0123456789",
    "end_time": null,
    "to_formatted": "(407) 555-0100",
    "phone_number_sid": "PN0b9c2733e2a9ad0c98352b0123456789",
    "subresource_uris": {
        "notifications": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789/Notifications.json",
        "recordings": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789/Recordings.json",
        "feedback": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789/Feedback.json",
        "payments": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789/Payments.json",
        "feedback_summaries": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/FeedbackSummary.json"
    }}