Can TFS 2010 Workflow-based team build get Code Coverage results? - workflow

Using Workflow to create a build I'd like for the build quality to change depending if the current code coverage threshold is met. I have everything set up but the condition to check the coverage percentages.
Is there a way to test if CodeCoveragePercentCovered > vMinThreshold? Once I figure this out, setting the build qualities is simple.

It's not part of the default Team Build 2010 functionality.
You would need to customize the build proces template and build your own activity to do this.

Related

Specflow Autogenerated c# code using cake

I was wondering if there was any way Cake could build Visual Studio Solution and detect changes in feature files and generate the corresponding changes. If not Cake, can it be done using any other way other than Visual Studio? I have tried finding documents related to it but I cant find anything related to it.
If you want to generate the code behind files of the feature files during build time, you have 2 options.
Run specflow.exe generate all in the pre build event
Documentation: http://specflow.org/documentation/Tools/
Use the MSBuild integration
Documentation. http://specflow.org/documentation/Generate-Tests-from-MsBuild/
The recommend way is to use the MSBuild integration.
I have no experience with Cake, but perhaps you can integrate/use one of these options with it.

Is it possible to specify aggregate code coverage testing when deploying with a list of tests to Salesforce

I am automating deployment and CI to our Salesforce orgs using Ant. In my build xml, I am specifying the complete list of our tests to run. Salesforce is returning code coverage errors, demanding 75% code coverage on a per file basis rather than allowing only 75% based on the total code base. Some of our old files do not have that level of coverage, and I am trying not to have to go back and create a ton of new tests for old software.
It seems like Salesforce is doing the code coverage based on the quickdeploy model, rather that the aggregate.
Does anyone know a way I can tell Salesforce not to use the quickdeploy model (if that is what it is doing). I have checked the Migration tool docs, but don't see anything.
Thanks...
Have you tried setting the attribute runAllTests="true" inside the sf:deploy tasks, rather than listing each test out?

How to include the build date and version number in Sandcastle builds

I'd like the date when the doc was built and a version number to be appended to the footer of all Sandcastle builds.
I use the SHFB gui to create the project file and then automate the build using TeamCity. Is there a way to get the build date and the TeamCity build # into the output?
Update:
I tried entering the footer text like Jeff suggested, but it does not add that to any page that I've seen.
Not sure about the TeamCity build number, but I was able to get the build date by adding this nonsense to the "Additional footer content" field in the Help File properties:
Documentation built {#BuildDate:yyyy\-MM\-dd}.
You can add replacement tags for the build date and time, like Jeff indicated. See
Customizing the build process for more options.
The documentation itself has no version, but you can display the Framework version, but that's probably not what you want.

jenkins plugin to display summary of builds for the day

Is there a plugin for jenkins that reports on the summary of the results of the build for the day?
e.g. a job executes 10 times a day and at the end of the day it will report on the results of all the builds.
Depending how much customization you need you may find Radiator View Plugin or eXtreme Feedback Panel Plugin useful.
You can also write your own custom Groovy-based job that utilizes Groovy Plugin to access Jenkins API in order to collect and display the statistics you need.

Getting the TeamCity build number into the AssemblyInfo file using Nant

I have done a lot of googling but cant seem to find an exact solution to get the TeamCity build number into my AssemblyInfo files. Would appreciate a full solution for my requirements...
1 Get the build number into a Nant variable. I believe that this code will accomplish this..
PropertyGroup
Version$(BUILD_NUMBER)/Version
/PropertyGroup
(repoduced as best as possible in SO).
2 Now I need a way to update the revision component of my version numbers so I get something like 1.0.0.[build number].
3 Ideally I need the whole thing in a re-usable Nant target so that I can just call it passing in the path to the assembly info file that i want to update.
I would respectfully request that if you can help me that a full solution is posted here with explanation as opposed to links to other sites. Ive looked at a lot of online examples but cant seem to find one that fits what I need - therefore I request the knowledge of the omnipotent SO community!
Thanks in advance.
First of all, the code snippet in your question is MSBuild syntax, not NAnt. Assuming that NAnt is your build tool, there is a good explanation of how to update AssemblyInfo files with Cruise Control.NET here. That applies to TeamCity as well, just replace "CCNetLabel" with "build.number" and you will be fine.
To get a version number like 1.0.0.[build number], you can accomplish that in the TeamCity build configuration. On the first configuration page (General Settings). Change the "Build Number Format" from "{0}" to "1.0.0.{0}". See the online help for more options.
I know you asked for an NAnt reusable task, but this is too cool.
TeamCity has a new feature tailor-made for this purpose (AssemblyInfo Patcher).
You don't have to change anything in the (NAnt) build. Just add the "Additional Build Feature" for AssemblyInfo patcher in the Build Steps configuration for the build. You can also set the format for the version there.