Replies: 1 comment
-
I've implemented my own InterceptableHttpRequestDialog (a custom action), and it's working well so far. It wasn't easy to do, and I'm sure it's far from perfect, or even complete. Still, if anyone else is interested, reply here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I'm writing some tests for my bot, and I want to prevent it talking to certain web services while under test. Instead, I want to intercept those calls (made with the "Send an HTTP request" node) and return mock results. Is this possible?
I tried the whole WebApplicationFactory -> CreateDefaultClient( myCustomHttpRequestHandler ); thing, but it seems that top-level HttpClient is ignored in Composer. Am I missing someting?
Should I create my own custom dialog that wraps an HttpClient, and replace all usages of "Send an HTTP request" with it? Assuming that will work, there will be no mechanism to remind devs in the future to only use the new custom dialog for HTTP requests... Oh well, we could live with that.
Luckily, I'm OK with the bot making requests to LUIS and QnAMaker during the tests (it's kind of what I want to test anyway: ambiguity between LUIS and QnA, and between the 100s of QnA pairs).
Thanks
Beta Was this translation helpful? Give feedback.
All reactions