如何在 loadrunner 中使用 twilio rest api?
How to use twilio rest api with loadrunner?
我目前正在对 IVR 负载测试进行 POC(概念验证),我只想调用 IVR,对音质和其他方面不感兴趣。所以我遇到了可以打出电话的twilio rest api。
它与 python 完美配合,但我想将它与 loadrunner 一起使用,因为它支持 rest api。我搜索了 twilio api 网址和键值组合。但运气不好。谁能给我提供所需的 URL 和键值排列。或者可以指导我如何获得这些。
提前致谢。
文档 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 对此也很有用。
{
"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"
}}
我目前正在对 IVR 负载测试进行 POC(概念验证),我只想调用 IVR,对音质和其他方面不感兴趣。所以我遇到了可以打出电话的twilio rest api。
它与 python 完美配合,但我想将它与 loadrunner 一起使用,因为它支持 rest api。我搜索了 twilio api 网址和键值组合。但运气不好。谁能给我提供所需的 URL 和键值排列。或者可以指导我如何获得这些。
提前致谢。
文档 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 对此也很有用。
{
"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"
}}