【问题标题】:How to use twilio rest api with loadrunner?如何将 twilio rest api 与 loadrunner 一起使用?
【发布时间】:2020-09-28 05:29:49
【问题描述】:

我目前正在 IVR 负载测试中进行 POC(概念验证),我只想调用 IVR,对音质等不感兴趣。所以我遇到了可以拨打电话的twilio rest api。

它与 python 完美配合,但我想将它与 loadrunner 一起使用,因为它支持 rest api。我搜索了 twilio api url 和键值组合。但运气不好。谁能给我提供所需的 URL 和键值排列。或者可以指导我如何获得这些。

提前致谢。

【问题讨论】:

    标签: twilio twilio-api loadrunner vugen


    【解决方案1】:

    文档Making Calls 包含一些代码示例和示例响应。您可以使用Postman(通过x-www-form-urlencoded POST)进行API 调用,并在返回的JSON 中查看键:值对,如下所示。 API Explorer in Twilio Console 对此也很有用。

    {
    "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"
    }}
    

    【讨论】:

      猜你喜欢
      • 2017-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-16
      • 1970-01-01
      • 2014-02-26
      相关资源
      最近更新 更多