Stuff
I'm gonna use this page to post various things that i created and want to share. Right now, there's not a lot of stuff to share, but over time this will probably grow to a larger list of various little projects or tools or whatever that might be useful to other people as well. Everything that gets posted here will be released under an open source license. You can access the subversion repository here.
Brion.Library
A small utility library. Download here. Currently contains:
- Everything you need to implement the Request/Response Service Layer
- The KnownTypeProvider class, to simplify WCF's KnownType usage
- My base Repository implementation for NHibernate
- My NHibernate Session Management classes
- The Query Batcher to simplify batching multiple queries with NHibernate
- Everything you need to batch queries from multiple, separate service requests
- Some other little things
Brion.MSBuildTasks
Some custom MSBuild Tasks. Download here.
- NUnitMergeOutput
This task combines the output of multiple NUnit xml reports into one combined xml report. The combined report will contain the results of each xml report that was fed to it, and it contains the total number of tests, failures, duration and overall success status of the entire test run.To define the task:
And to use it in a target:<UsingTask AssemblyFile="$(MSBuildProjectDirectory)\Libs\Brion.MSBuildTasks\Brion.MSBuildTasks.dll"
TaskName="NUnitMergeOutput"/>
<CreateItem Include="TestResults\*.xml" >
<Output TaskParameter="Include" ItemName="NUnitOutputXmlFiles"/>
</CreateItem>
<NUnitMergeOutput NUnitOutputXmlFiles="@(NUnitOutputXmlFiles)"
PathOfMergedXmlFile="TestResults\TestResults.xml" />
- BuildTeamCityNUnitArguments
TeamCity doesn't easily allow you to enable its integrated NUnit testing support while still keeping the NUnit output xml files around after the build. This task prepares an xml arguments file to pass to TeamCity's NUnitLauncher task which does make it possible to keep the NUnit output xml in a directory you can specify. You can find more info on this problem here and more info on this workaround here.To define the task:
And to use it in a target:<UsingTask AssemblyFile="$(MSBuildProjectDirectory)\Libs\Brion.MSBuildTasks\Brion.MSBuildTasks.dll"
TaskName="BuildTeamCityNUnitArguments"/>
<CreateItem Include="**\Bin\Debug\*Tests*.dll" >
<Output TaskParameter="Include" ItemName="TestAssemblies" />
</CreateItem>
<BuildTeamCityNUnitArguments HaltOnError="true" HaltOnFirstTestFailure="true"
HaltOnFailureAtEnd="true" TestAssemblies="@(TestAssemblies)"
NUnitResultsOutputFolder="TestResults"
PathOfNUnitArgumentsXmlFile="nunitarguments.xml" />
<Exec Command="$(teamcity_dotnet_nunitlauncher) @@ nunitarguments.xml" />
Pingback: .NET Utility Libraries Galore « HSI Developer Blog
Pingback: Unit tests for self-education « software crafts[wo]man