admin管理员组文章数量:1335600
We are using the Logic App Standard Unit Testing Framework () and we have run into an issue where we are unable to mock an HTTP request to an external API. No matter how we build the Mock, we receive live data back from the system.
In larger tests we have been able to mock request to local function app actions, but are unable to mock requests to an external API using the HTTP action.
We have confirmed that all the parameters we use to attempt a match are valid and identical to the action. We've tried several different ways to match.
Test.cs: .cs.txt
Parameters.json: .json
testConfiguration.json: .json
Tests.csproj: .csproj.txt
workflow.json: .json
Sample Data:
{ "users": [ { "id": 1001101, "first_name": "Jack", "last_name": "Wilson", "email": "[email protected]", "telephone": "", "timezone": "Pacific Time (US & Canada)", "weekly_capacity": 144000, "has_access_to_all_future_projects": false, "is_contractor": true, "is_active": true, "calendar_integration_enabled": false, "calendar_integration_source": null, "created_at": "2024-11-05T21:18:55Z", "updated_at": "2024-11-05T21:25:58Z", "can_create_projects": false, "default_hourly_rate": 150, "cost_rate": null, "roles": [ "Integration Developer" ], "access_roles": [ "member" ], "permissions_claims": [ "expenses:read:own", "expenses:write:own", "timers:read:own", "timers:write:own" ], "avatar_url": ".png" }, { "id": 1001102, "first_name": "Sasha", "last_name": "Miller", "email": "[email protected]", "telephone": "", "timezone": "Pacific Time (US & Canada)", "weekly_capacity": 144000, "has_access_to_all_future_projects": false, "is_contractor": true, "is_active": true, "calendar_integration_enabled": false, "calendar_integration_source": null, "created_at": "2024-04-08T19:52:51Z", "updated_at": "2024-05-30T07:48:13Z", "can_create_projects": false, "default_hourly_rate": 0, "cost_rate": 0, "roles": [ "Project Manager" ], "access_roles": [ "member" ], "permissions_claims": [ "expenses:read:own", "expenses:write:own", "timers:read:own", "timers:write:own" ], "avatar_url": ".png" }, { "id": 1001103, "first_name": "Luke", "last_name": "Walker", "email": "[email protected]", "telephone": "", "timezone": "Pacific Time (US & Canada)", "weekly_capacity": 144000, "has_access_to_all_future_projects": false, "is_contractor": true, "is_active": true, "calendar_integration_enabled": false, "calendar_integration_source": null, "created_at": "2024-04-08T19:52:51Z", "updated_at": "2024-05-30T07:48:13Z", "can_create_projects": false, "default_hourly_rate": 0, "cost_rate": 0, "roles": [ "Integration Contractor" ], "access_roles": [ "member" ], "permissions_claims": [ "expenses:read:own", "expenses:write:own", "timers:read:own", "timers:write:own" ], "avatar_url": ".png" } ], "per_page": 2000, "total_pages": 1, "total_entries": 12, "next_page": null, "previous_page": null, "page": 1, "links": { "first": ";page=1&per_page=2000&ref=first", "next": null, "previous": null, "last": ";page=1&per_page=2000&ref=last" } }
版权声明:本文标题:azure - Logic App Standard Unit Testing Framework - Unable to Mock HTTP Request to external apis - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742393860a2466524.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论