Is there a tutorial somehwere or can somebody explain how to integrate dotCover with TFS? I want to run dotCover (probably the console runner?) as part of the team build process and would like to generate a report that is integrated in the TFS build report.
Running dotCover itself will be easy enough. Simply add an InvokeProcess activity to the build workflow and call the appropriate command line options. I've got a blog post showing how this is done (calling the VB6 compiler in my example) but it should show you what you need to do.
The hard part will be integrating a report into the TFS build report. All you'll really be able to do is slightly customise the log - see Ewald Hoffmans blog post (and series) on customising the build if you want to do this.
Related
I have generated my xml coverage file as part of CI build on the TFS server using vNext 2015 build definition. How would one display the results in the TFS 2015 summary ? Either using the xml report or the html generated using the ReportGenerator.
You need to convert the results produced by OpenCover to a format which can be parsed by TFS.
One way to do this would be to use the OpenCoverToCoberturaConverter NuGet package.
Once you have that, you can use the Publish Code Coverage Results build step.
I have described the whole process on my blog.
In “TFS 2015 - Update 2” this is possible by writing your own vsts extension (see here: https://www.visualstudio.com/en-us/docs/integrate/extensions/overview ).
I set up my own 'learning project' for building this as .vsix here: https://github.com/RobertK66/vsts-opencover.
My custom build step uses nunit3 console runner to execute tests under opencover.
I managed to upload the OpenCover xml result file as 'testrun-attachment' via REST-interface and got the pieces in place to show the summary values on both the build summary tab and on its own extended “build-results-view”.
Base for this first version were a lot of examples provided by MS on github: https://github.com/Microsoft/vsts-tasks and https://github.com/Microsoft/vsts-extension-samples
To get a first feeling what places on your TFS Web Portal can be extended/customized you can download and install this extension https://aha.gallery.vsassets.io/items?itemName=ms-samples.samples-contributions-guide from the Visual Studio Marketplace.
Hope this helps to get you started.
Currently, these customizations are not supported. You can't edit the displays in new build summary. However, you can customize Code Coverage Analysis.
You can submit it to User Voice site at:
http://visualstudio.uservoice.com/forums/121579-visual-studio
Instead of using OpenCover extension, it is very convenience for you to generate code coverage result and include it in the build summary page this way:
Select the Visual Studio Test step, check the Code Coverage Enabled option.
Then, the code coverage result shows on the build summary page:
I am trying to clickonce-publish a client app compiled using the scriptable build system available on Visual Studio Online. It seems something new.
I was able to find some articles showing how to customize msbuild and add parameters to make it work on local TFS:
http://publicvoidlife.blogspot.pt/2014/05/continuous-integration-with-tfs-and.html?showComment=1441022327672 and
http://www.dontpaniclabs.com/blog/post/2011/04/29/clickonce-publish-and-deploy-from-team-foundation-server-2010/
But in Visual Studio Online there are some different things. I see there are some "build steps" I can set that include package/deploy scripts. Can I use them for clickonce?
If setting clickonce publish during msbuild is the way to go, how to set parameters on the "visual studio build" script?
I don't know how to specify the "publish" option on msbuild script ui nor how to specify necessary parameters.
Any ideas?
Thank you,
Just as described in the blogs you posted, you need to customize build process template to be able to publish clickonce app. Here is another link which is useful for you, from which you can check the detailed information on how to do the customization step by step (includes information on how to add arguments, how to add /t:publish msbuild arguments) (it is written for TFS2010, applies to VSO as well): http://www.codeproject.com/Articles/122388/TFS-Team-Build-with-ClickOnce-Applications
I am creating a build definition in visual studio 2013. As you know, while creating build definition we can also set the assembly (in "Automated Tests" section) which contains the unit test methods to run. I am able to create the definition till this point. Now, what I want is once the test run is over, I want to call an exe that will parse the Trx file generated as a result of test run and send the run results in an email.
Can anyone have an idea about where I can set the path to the exe and pass some arguments to it while creating build definition? If this cannot be done while creating definition, what else is the other way to achieve it?
Thanks!
What you ask involves multiple steps, especially if you want to pull the tool from version control (which is IMHO the best option).
See the ALM Rangers' Team Foundation Build Customization Guide for help and guidance on this topic.
Or you can just setup an email notification when the TFS Build completes. That should include the test run results, and a clickable link to go to the full build report.
In TFS while we fire a build. the build log is generated with all the details. like testcases result, code analysis etc...
How do I add some more details in build log? Which API need to be used to edit build log from custom activity?
Please provide me some article links if possible.
I manage to use bddlib(storyq) with combination of xunit.net using resharper runner. Than decided to try to specflow, since have read its advantages over storyq.
Now I do have also another requirement to integrate this all with tfs build 2010. Am bit lost there how the big picture gonna look like. I found some articles on how to make work xunit.net with tfsbuild 2010, however there is no single word on bdd lib integration with tfsbuild more specifically continuous integration (ci).
Anyone could have helped ? thanks.
If you can run it from the command-line you can simply customize your TFS Build workflow by tossing an InvokeProcess activity in there. An example of customizing the workflow can be seen here: http://www.ewaldhofman.nl/post/2010/04/28/Customize-Team-Build-2010-e28093-Part-3-Use-more-complex-arguments.aspx