0

I'm currently developing Teams Bot with Bot framework sdk v4 ( c#) and I can't find a reliable way to test it. I can't use Teams Toolkit because most of the things are automated and Azure Admins won't give me permissions to even use that, I'm only provided with BotId and that's it.

I'm using Bot Framework Emulator for testing; but some of the things are not working in Teams and vice versa. I thought about using Test Tool, but I can't find a way to use it. The only docs and tutorials are for VS Code and JS/TS.

I saw in article Introducing Teams App Test Tool (microsoft.com) that you can Integrate with existing Teams bot applications: The test tool can be integrated with existing Teams bot applications that are built with Bot Framework SDK. But I found that not possible. I would need to create a project with Teams Toolkit and move everything there. So, I would be really grateful, if someone could show me how to integrate Test Tool with existing Bot Framework SDK project in Visual Studio.

I want to test my bot (C#) locally with Test Tool, with use of Visual Studio. Tried a lot of 'hacks' but none worked.

3
  • Could you please refer this doc once - learn.microsoft.com/en-us/microsoftteams/platform/toolkit/… Commented Sep 13 at 7:04
  • I'm aware of that doc, but can't find a way to make it work with EXISTING bot created with Bot Framework SDK and not Teams Toolkit
    – nykko
    Commented Sep 13 at 13:26
  • Please provide enough code so others can better understand or reproduce the problem.
    – Community Bot
    Commented Sep 16 at 21:25

1 Answer 1

0

In fact, the contract between a Teams bot and Team App Test Tool is the bot endpoint (e.g., http://127.0.0.1:3978/api/messages). So technically it's possible to use Test Tool without Teams Toolkit.

Here're the steps:

  1. Install Teams App Test Tool via npmjs.org

    npm install --global @microsoft/teams-app-test-tool
    
  2. Replace the bot ID and bot password with empty string in your bot app source code.

  3. Launch your bot app locally.

  4. Launch Teams App Test Tool with following command:

    teamsapptester start
    

    Note, if your bot app is not launched at http://127.0.0.1:3978, then you need to set the BOT_ENDPOINT environment variable before launching Test Tool, like:

    # for Windows
    SET BOT_ENDPOINT=http://127.0.0.1:8888/api/messages && teamsapptester start
    

Then, it will pop up a browser to open the Test Tool's web UI.

1
  • Thank you! Finally have a way to test it with Test Tools :)
    – nykko
    Commented Sep 19 at 13:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.