Is it possible to setup TFS/Test Manager so that it sends out an email after a test fails?
Yes, it is possible but it requires quite a lot of changes/additions to the process template and possibly a custom-made activity.
After tests have run, we check if BuildDetail.BuildPhaseStatus has status failed
We send mail to everyone who has changesets committed to this build, so the build goes through BuildDetail.AssociatedChangesets (you need to have AssociateChangesetsAndWorkItems on) and get the committer username.
Unfortunately for us, there's no good correlation between TFS username and email address at our place, so we had to create a custom activity that looks that up in the AD.
The actual email is sent with the BuildReport action from Community TFS Build Extensions. We modified the xslt, but that's not really necessary. We also wanted to include a listing of the failed tests, and that required modification of the action itself (test data isn't included by default).
Looking at this description and all the work made to get this working, I'm beginning to wonder if it was worth it ;).
Related
I am working on a plugin for TFS to hook certain operations. I'm able to successfully hook code pushes via using an ISubscriber on PushNotification, but am having trouble finding any type that matches up with the completion of a Pull Request.
A little more on what I'm trying to do. I currently have a PushNotification hook that has some branch specific checks that it does. Some reject a push, others provide notifications to users using some complex rules. I need a way to be able to provide the notifications at a minimum, and ideally prevent the pull request from going through. I can't provide notifications prior to the pull request going through as the notifications should only occur for code being placed in our main repository.
Long term, I want to switch it over to using the webhooks and some async approval, but I don't have the time to adapt the tools to work like that and setup the additional server needed to make that happen. If there's no good solution, I'll simply disable pull requests for now until I can write proper services for it, but if there is a way to reuse the adapted hooks that can run on the PushNotification ISubscriber, it would be extremely helpful.
I've been reading a few articles and watching a few videos on Jenkins. I'm wondering how easy it would be once the master branch has been deployed to a staging server to automatically send an email to the client notifying them of the url to the staging server and also giving them a link to "deploy live". This way the client can see the changes, make sure they're happy with it then deploy it themselves without having to email anyone requesting it to go live.
Anyone got any idea how easy this would be to do with Jenkins? There may be a plugin that does this but so far I've not come across anything.
I saw a talk where a guy does this to notify QA of a new build to test, as well as notify when a build is ready to be published to production.
Basically the last automated job (deploy to staging job) has a post build step to send an email to some address. The body of the email contains a link back to the REST API for the "deploy to production" job, triggering a build.
Email recipient tests things, and if satisfied, clicks the link and Jenkins runs the production job. Obviously this requires that the recipient has some kind of access to (at the very least, the REST API of) the Jenkins instance. That being said, there's no reason you couldn't set up your own system to take limited external requests and forward them to your Jenkins API.
The video link (including time reference of the relevant part) is: https://youtu.be/3HI7mv_791k?t=3169
If you've been watching a few videos you might have already come across it, but it's quite long so you might not have watched it all.
I'm using Quartz.NET to fire off a very basic (proof of concept) job that checks for new records and sends e-mails if any exist. I want other programmers to be able to modify their jobs via the jobs file.
However, Quartz.NET never checks the file for changes. From observation, it looks like every time it checks, it tries to store the LAST_MODIFIED_TIME in its database (ADO.NET, MSSQL), and fails to serialize the date. I've tried using both quartz.config and the <quartz> configuration section within the application's standard config file, but both ultimately produce the same error.
I've researched this topic and found an existing issue logged in Quartz.NET's GitHub site, which was posted in 2012. At this point, it looks like the developer is unable to fix this issue. Does anyone have a workaround?
I am using TFS 2010 for build service. I need to send an email if the build is running for longer time.
For ex: Suppose the build normally runs for 10 mins, but now if the build is running for more than 20 mins... i need to send an email notification.
May I have your help on this?
This functionality is not available out of the box. This can however, make a great feature request, raise it for consideration here => http://visualstudio.uservoice.com/forums/121579-visual-studio
However, to get this to work here is what you can do... Write a tfs build activity which using the tfs api extracts the last build execution time and insert that at various places in the process workflow ideally before and after each work flow task to check how much time has the build already consumed while measuring this against the expected time. Use the email notification task to send out an email accordingly.
Here is an example that shows u how to get the last build details, http://blogs.microsoft.co.il/blogs/shair/archive/2011/01/11/tfs-api-part-33-get-build-definitions-and-build-details.aspx and here a custom task example http://msdn.microsoft.com/en-us/library/t9883dzc.aspx
Alternatively, query the TFS Build Queue and check the runtime of the builds in progress. When any of the builds exceeds the defined thresholds, send the email. This can be done in a windows service with relative ease.
You'd use the TFS Client Object Model to query the builds like this. Tarun already provided a nice link to that.
I have a Rails 3.1 app deployed to Heroku. This app makes heavy use of mailers. I'm looking for a way to run a sort of integration-stress test. In other words, I would like to automate integration tests that cover from user action to email receipt (not simply delivery), and I want to use these test to stress-test the app. As Heroku runs everything in production mode, I'm can't run this server-side.
(I'm happy enough to script the actual user interaction, though I'm interested in suggestions. What's really tripping me up is actual email receipt. What would I use to monitor incoming emails? I'd like to not use a separate tool, and I'd prefer not to check that emails were received after testing, as I would like my stress test to also calculate elapsed time between user interaction and email receipt, etc.)
I don't think you can avoid using a separate tool if you actually want to check the messages were received at the end point. I wrote a blog post on a number of options for receiving emails.
Since you're running things locally and don't nessesarily need to be performant it might actually be enough for your tool to connect via pop3 or imap and download the email to check it was delivered.