Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Unit Testing with Java SDK #1462

Open
ckorbel opened this issue Apr 21, 2022 · 2 comments
Open

Unit Testing with Java SDK #1462

ckorbel opened this issue Apr 21, 2022 · 2 comments
Labels
feature-request A request for new functionality or an enhancement to an existing one. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@ckorbel
Copy link

ckorbel commented Apr 21, 2022

Use this query to search for the most popular feature requests.

Is your feature request related to a problem? Please describe.
I have been trying to figure out a way to write unit tests for my bot's dialogs made with the Java SDK, but haven't had much luck. I have been going through the documentation https://docs.microsoft.com/en-us/azure/bot-service/unit-test-bots?view=azure-bot-service-4.0&tabs=javascript. and the sample bots: https://github.com/microsoft/BotBuilder-Samples. I haven't been able to find any examples of unit testing the bot SDK in Java.

Describe the solution you'd like
Ideally I would like to have a DialogTestClient() and similar to the ones that exist in Javascript and C#: https://docs.microsoft.com/en-us/azure/bot-service/unit-test-bots?view=azure-bot-service-4.0&tabs=javascript. Something that would allow me to write tests for dialogs in isolation outside of a bot and without having to deploy your code to a web service.

Describe alternatives you've considered
I have looked into potentially developing a spinning up an instance of the bot and writing tests against the api responses we get from it, which feels separate from unit testing.

Additional context

@ckorbel ckorbel added feature-request A request for new functionality or an enhancement to an existing one. needs-triage The issue has just been created and it has not been reviewed by the team. labels Apr 21, 2022
@ClaudioConsolmagno
Copy link

Related to microsoft/BotBuilder-Samples#3690

@mat-gt
Copy link

mat-gt commented Aug 29, 2022

The DialogTestClient already exists since quite a long time now in bot-dialogs artifact but has never been released. I don't know the reason behind this choice. I'm using it with QnAMakerDialog and it works correctly. Other examples with SkillDialog are also available on this repository.
https://github.com/microsoft/botbuilder-java/blob/main/libraries/bot-dialogs/src/test/java/com/microsoft/bot/dialogs/DialogTestClient.java

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request A request for new functionality or an enhancement to an existing one. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

No branches or pull requests

3 participants