microsoft/teams.net

Public

mirrored from https://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
682a2b33e7a9062b703cd1f0ffeb0b7b80ea504c

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

core/samples/MessageExtensionBot/README.md

55lines · modecode

1# MessageExtensionBot Testing Guide
2
3A sample bot demonstrating Teams message extension handlers.
4
5## Setup
6
71. Configure bot credentials in `appsettings.json` or environment variables
82. Run the bot: `dotnet run`
93. Upload `manifest.json` to Teams
10
11## Testing Handlers
12
13### OnQuery (Search)
14**Manifest:** `composeExtensions.commands` with `type: "query"`
15
161. Open message compose box
172. Select the message extension
183. Type a search term
194. Verify results display in list format
205. Type "help" to test message response
21
22### OnSelectItem
23**Manifest:** No specific requirement (works with OnQuery results)
24
251. After running a search (OnQuery)
262. Click on any search result
273. Verify adaptive card preview appears
28
29### OnFetchTask (Action - Task Module)
30**Manifest:** `composeExtensions.commands` with `type: "action"` and `fetchTask: true`
31
321. Click the message extension action button (createAction)
332. Verify task module opens with input form
34
35### OnSubmitAction (Action Submit)
36**Manifest:** No specific requirement (works with OnFetchTask)
37
381. Fill form in task module
392. Click submit
403. Verify preview card appears with Edit/Send buttons
414. Click Edit - verify form reopens with values
425. Click Send - verify final card posts to conversation -- Currently this only works when we start from commandbox.
43
44### OnQueryLink (Link Unfurling)
45**Manifest:** `composeExtensions.messageHandlers` with `type: "link"` and `domains`
46
471. Paste a URL in compose box that matches the unfurl domain in manifest (*.example.com)
482. Verify card unfurls automatically
49
50### OnQuerySettingUrl (Settings)
51**Manifest:** `composeExtensions.canUpdateConfiguration: true`
52
531. Right-click message extension icon
542. Select Settings
553. Verify settings URL opens (microsoft.com)
56