I am trying to notify the test failures via teams channel.So whenever a test fails, a notification will be sent to a teams channel with the help of teams incoming webhooks.
Along with the above details, I would like to tag people who are responsible for the tests.
Below is the data I am sending. But instead of mention, plain text is getting published.
Data passed for ID: email ID [“[email protected]”]
Data passed for name: not sure what has to be passed for this parameter [“Hu, Xhan”]
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "0076D7",
"summary": "e2e Failed test",
"sections": [{
"activityTitle": "![TestImage](https://47a92947.ngrok.io/Content/Images/default.png)e2e Failed test",
"activitySubtitle": "FT4 validation",
"activityImage": "https://teamsnodesample.azurewebsites.net/static/img/image5.png",
"facts": [{
"name": "Assigned to",
"value": "@Xhan"
}, {
"name": "Script",
"value": "Script name"
}, {
"name": "Scenario",
"value": "Scenario name"
}, {
"name": "Step",
"value": "Test Step"
}],
"markdown": true
}],
"potentialAction": [{
"@type": "ActionCard",
"name": "Result Link",
"actions": [{
"@type": "OpenUri",
"name": "Result Link",
"targets": [
{ "os": "default", "uri": "https://dummylinkForNotifications" }
]
}]
}],
"msteams": {
"entities": [
{
"type": "mention",
"text": "<at>Xhan</at>",
"mentioned": {
"id": "[email protected]",
"name": "Hu, Xhan"
}
}
]
}
}