botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

DCR: As a developer, I would like to see some documentation to understand how to use the DialogTestClient provided by the framework so I can write unit tests for my bot

Open gabog opened this issue 6 years ago • 10 comments

The new Testing Framework needs to be documented so developers understand how to use it.

The documentation should include:

  • Inline documentation in code for key classes, methods and properties in the testing framework.
  • Redme.md files in CoreBot samples
  • Code comments in CoreBot samples
  • Getting started guide on how to write tests posted to docs.microsoft.com ( created for each supported language under https://aka.ms/cs-unit-test-docs)

Tracking Status for documentation

Dotnet documentation

  • [x] PR
  • [x] Merged

Javascript documentation

  • [x] PR
  • [x] Merged

Python documentation

  • [ ] PR
  • [ ] Merged

Tracking Status for samples readme

Dotnet Readme

  • [x] PR
  • [x] Merged

Javascript Readme

  • [x] PR
  • [x] Merged

TypeScript Readme

  • [x] PR
  • [x] Merged

Python Readme

  • [ ] PR
  • [ ] Merged

gabog avatar Apr 09 '19 21:04 gabog

Content is now staging here: https://review.docs.microsoft.com/en-us/azure/bot-service/test-bot?view=azure-bot-service-4.0&branch=pr-en-us-1588.

Kaiqb avatar Jul 03 '19 16:07 Kaiqb

@Kaiqb, reopening this one to be able to track the changes that will be needed for Python in 4.6.

gabog avatar Jul 22 '19 15:07 gabog

@gabog - Python is not going to GA in 4.6. Removing the 4.6 tag.

Kaiqb avatar Sep 06 '19 21:09 Kaiqb

@gabog - are you planning to update this workitem for Python in R7?

Kaiqb avatar Nov 07 '19 23:11 Kaiqb

  • @axelsrz, hi Axel, are you planning to write docs as part of Python R7 support for testing dialog?

gabog avatar Nov 11 '19 18:11 gabog

@gabog If we have an equivalent doc for C# and JS, yes.

axelsrz avatar Nov 11 '19 18:11 axelsrz

@axelsrz - we do have C# and JS docs. You can see it here. Do you plan to have additional namespaces to support the testing approach outlined in the topic? I just need to confirm that this will land in R7 (December 10th).

Kaiqb avatar Nov 11 '19 20:11 Kaiqb

@Kaiqb This is already in master branch, the new library is botbuilder-testing https://github.com/microsoft/botbuilder-python/tree/master/libraries/botbuilder-testing

axelsrz avatar Nov 18 '19 23:11 axelsrz

Thanks! We'll pick this up in R8.

Kaiqb avatar Nov 19 '19 18:11 Kaiqb

@axelsrz What are the dependencies for Python? The current topic has this for C# and JavaScript:

  • C#: The CoreBot Tests sample used in this topic references the Microsoft.Bot.Builder.Testing package, XUnit, and Moq to create unit tests.
  • JS: The CoreBot Tests sample used in this topic references the botbuilder-testing package, Mocha to create unit tests and Mocha Test Explorer to visualize test results in VS Code.

Also, I see a 13.core-bot.tests for C# and 13.core-bot for JS has a test subfolder. I don't see anything comparable for Python. Where can I pull code snippets from?

JonathanFingold avatar Jun 25 '20 22:06 JonathanFingold