2

I have read it on few msdn forum that test Management service in Team Foundation Server raises notifications on some specific actions by its users. You can subscribe

to these notifications to understand what’s going on in the server. Here are some of the important notifications which are raised by test management service.

TestRunStartedNotification TestRunChangedNotification TestRunCompletedNotification TestPlanChangedNotification TestSuiteChangedNotification TestConfigurationChangedNotification

Can anybody share the step for it like how to set alert for this after TestRunCompletedNotification mail should be sent to user. Can it be done through MTM. I know TFS alert but i want to it for specific suite or plan that email should be sent after test run over.

please help

leppie
  • 115,091
  • 17
  • 196
  • 297
simond
  • 684
  • 1
  • 10
  • 36

1 Answers1

0

If you start automated tests manually from MTM, there is no default way like TFS alert for these events. To use these services, you need to create a listener to listen to these events. That means you have to use TFS API and implement sending e-mail yourself. You can check the blog on how to create a event handler: http://vgaltes.com/index.php/2013/04/14/create-a-team-foundation-server-event-handler/

If you only want to get alert of the test result, you can create a build definition using LabDefaultTemplate, and use this build definition for starting your tests instead of starting them from MTM. Each time, you want to run tests, you can queue this build. In this way, you can create Build Alerts in TFS to get notification of the test result.

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • Yes i am using TFS team foundation build service but my question is like-Can we set alert /Notification email from mtm when we run automation suite from MTM and after the all test finish of that perticular suite mail should be sent . So is there any service in MTM for this. Editing LabDefault template can also send email for MTM suite thats what you want to say right ...? – simond Dec 17 '15 at 09:23
  • As I mentioned, there is no default way to set alert/Notification email from MTM like TFS alert. You need to use TFS API to create a listener to listen to test events and implement sending e-mail yourself. Using LabDefault template, you can start test when you queue builds, if the test fail, the build fail, then you can get a build alert, this way is limited, you can only get the alert for the test result (pass/fail), and it's actually a build alert, not test alert. – Cece Dong - MSFT Dec 17 '15 at 09:44
  • I Got your point but I am running automation suite using task scheduler so everything is triggered automatically. So i never know when my test finishes its execution. You mean its not doable as of now right so we can never get email for test suite run. – simond Dec 17 '15 at 10:02
  • No default way, you have to use TFS API to create a listener to listen to test events and implement sending e-mail yourself. – Cece Dong - MSFT Dec 18 '15 at 02:26