Blog'A'Little

Just another C# guy

MSBuild Task for generating testrunconfig file

**** <UPDATE Date="22nd of may 2008"> ****

You have to add the namespace specification in front of every element.
Create a XNamespace by doing :

XNamespace microsoftNamespace = http://microsoft.com/schemas/VisualStudio/TeamTest/2006;

Then for all the XElements do new XElement(microsoftNamespace + "<tagname>");

**** </UPDATE> ****

 

I've been working a bit with automating our build process and creating a lot of CI builds. Today I started getting our builds to run all the tests, create code coverage and then run static code analysis for it all. Getting the code coverage demands that the assemblies run during unit testing are all instrumented. Normally on the client side you just have a .testrunconfig file attached configured with all the assemblies. This same file could be used from the MSBuild running on the TFS as well as Buck Hodges blogged about a while back, but it would demand human interaction whenever assemblies were added or removed. I figured I had to come up with a remedy to this and created my own MSBuild task to handle it all.

image

The above code outputs the correct XML needed as input for the unit test run. So in your MSBuild file you need to use the same file for output through this task as the RunConfigFile property used bu the TFS TeamBuild.

kick it on DotNetKicks.com kick it on GameDevKicks.com

Comments

2000 - 1995 @ Ansi Lumens 1000 1 Contrast Ratio Christie Lw300, Lw300 Pump - 454.akemet.com said:

Pingback from  2000 - 1995 @ Ansi Lumens 1000 1 Contrast Ratio Christie Lw300, Lw300 Pump - 454.akemet.com

kick it on DotNetKicks.com kick it on GameDevKicks.com
# mai 31, 2010 3:59

E Cigarette said:

Author half-wit

kick it on DotNetKicks.com kick it on GameDevKicks.com
# april 28, 2011 12:49

sigarety said:

The bundance of interesting articles on your website amazes me! Author - good luck and new interesting posts!

kick it on DotNetKicks.com kick it on GameDevKicks.com
# april 28, 2011 11:38

flirt said:

All excellent written

kick it on DotNetKicks.com kick it on GameDevKicks.com
# april 29, 2011 10:38

goldfishka said:

However, the author skillfully nakreativil!

kick it on DotNetKicks.com kick it on GameDevKicks.com
# mai 8, 2011 2:11

Buying Digital Camera said:

Thanks for your mail on this blog. From my own sophistication, on occasion softening upward a photograph could perchance provide the digital photographer with a dose of an artsy flare. Every now however, this soothing clouds isn't exactly what you had as the primary target and can all things considered mess up a normally good photograph, specifically if you look forward to enlarging this.

kick it on DotNetKicks.com kick it on GameDevKicks.com
# mai 18, 2011 9:24

zhenskayaobuv said:

Surf the web and came here.

kick it on DotNetKicks.com kick it on GameDevKicks.com
# mai 28, 2011 11:37

Cooking games for girls said:

Hi there, I'm very happy at this moment coz the search engines only rerouted my family to this particular great www.dolittle.com for your google listing. I actually appreciate to you administrative. You have made this very clear to us all well plus without problems. I do believe absolutely everyone obtained a transparent notion relating to this subject. I might definitely appreciate if you continue this type of job in future along with let us provide additional probability to know more. Thank you.  

kick it on DotNetKicks.com kick it on GameDevKicks.com
# mai 28, 2011 10:35

hot news blog said:

<a href=http://www.abouthotnews.tk>hot news blog</a>

kick it on DotNetKicks.com kick it on GameDevKicks.com
# juni 8, 2011 4:24

sexy said:

Text perspective, placing the site to your favorites.

kick it on DotNetKicks.com kick it on GameDevKicks.com
# juni 24, 2011 3:11

glaucoma eye drops said:

Thanks on your marvelous posting! I quite enjoyed reading it, you can be a great author.I will make certain to bookmark your blog and will come back in the future. I want to encourage you to ultimately continue your great posts, have a nice holiday weekend!

kick it on DotNetKicks.com kick it on GameDevKicks.com
# juli 5, 2011 10:52
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Design downloaded from Free Templates - your source for free web templates