Permalink
Browse files

adding ncover and nunit tools folders. starting to work on rakefile f…

…or build
  • Loading branch information...
1 parent f0a5522 commit 42cc87d8c6293b49057927527aac66adad66fece @derickbailey committed Oct 28, 2009
Showing with 18,785 additions and 0 deletions.
  1. +53 −0 rakefile.rb
  2. +287 −0 tools/NCover-v3.3/ActiproEULA.hml
  3. BIN tools/NCover-v3.3/ActiproSoftware.Shared.Wpf30.dll
  4. BIN tools/NCover-v3.3/ActiproSoftware.SyntaxEditor.Addons.DotNet.Wpf30.dll
  5. BIN tools/NCover-v3.3/ActiproSoftware.SyntaxEditor.Wpf30.dll
  6. BIN tools/NCover-v3.3/ActiproSoftware.Text.Net20.dll
  7. BIN tools/NCover-v3.3/AdminBootstrapper.exe
  8. +237 −0 tools/NCover-v3.3/Build Task Plugins/MSBuildNCoverExample.proj
  9. +224 −0 tools/NCover-v3.3/Build Task Plugins/MSBuildReportingExample.proj
  10. +241 −0 tools/NCover-v3.3/Build Task Plugins/NAntNCoverExample.build
  11. +218 −0 tools/NCover-v3.3/Build Task Plugins/NAntReportingExample.build
  12. BIN tools/NCover-v3.3/Build Task Plugins/NCover.MSBuildTasks.dll
  13. BIN tools/NCover-v3.3/Build Task Plugins/NCover.NAntTasks.dll
  14. BIN tools/NCover-v3.3/Build Task Plugins/NCoverExplorer.MSBuildTasks.dll
  15. BIN tools/NCover-v3.3/Build Task Plugins/NCoverExplorer.NAntTasks.dll
  16. +2,330 −0 tools/NCover-v3.3/CC.Net/NCoverReporting30.xsl
  17. +55 −0 tools/NCover-v3.3/CC.Net/dashboard.config
  18. +35 −0 tools/NCover-v3.3/CC.Net/excanvas.js
  19. BIN tools/NCover-v3.3/CC.Net/g.png
  20. +19 −0 tools/NCover-v3.3/CC.Net/jquery-1.3.2.min.js
  21. BIN tools/NCover-v3.3/CC.Net/r.png
  22. +51 −0 tools/NCover-v3.3/CC.Net/readme.txt
  23. +184 −0 tools/NCover-v3.3/CC.Net/trends.js
  24. BIN tools/NCover-v3.3/CC.Net/y.png
  25. BIN tools/NCover-v3.3/MSVCM90.dll
  26. BIN tools/NCover-v3.3/MSVCP90.dll
  27. BIN tools/NCover-v3.3/MSVCR90.dll
  28. +13 −0 tools/NCover-v3.3/Microsoft.VC90.CRT.manifest
  29. BIN tools/NCover-v3.3/Mindscape.LightSpeed.Linq.dll
  30. BIN tools/NCover-v3.3/Mindscape.LightSpeed.dll
  31. BIN tools/NCover-v3.3/NCover.Console.exe
  32. +54 −0 tools/NCover-v3.3/NCover.Console.exe.config
  33. BIN tools/NCover-v3.3/NCover.Data.x86.dll
  34. BIN tools/NCover-v3.3/NCover.Explorer.Framework.dll
  35. BIN tools/NCover-v3.3/NCover.Explorer.exe
  36. +16 −0 tools/NCover-v3.3/NCover.Explorer.exe.config
  37. BIN tools/NCover-v3.3/NCover.Framework.XmlSerializers.dll
  38. BIN tools/NCover-v3.3/NCover.Framework.dll
  39. BIN tools/NCover-v3.3/NCover.Interfaces.Core.dll
  40. BIN tools/NCover-v3.3/NCover.Interfaces.dll
  41. BIN tools/NCover-v3.3/NCover.Legacy.Configuration.dll
  42. BIN tools/NCover-v3.3/NCover.Lib.x86.dll
  43. BIN tools/NCover-v3.3/NCover.Registration.exe
  44. BIN tools/NCover-v3.3/NCover.Reporting.exe
  45. BIN tools/NCover-v3.3/NCover.Runner.dll
  46. BIN tools/NCover-v3.3/NCover.UpConvert.exe
  47. BIN tools/NCover-v3.3/NCover.Utilities.dll
  48. BIN tools/NCover-v3.3/NCoverEULA.pdf
  49. BIN tools/NCover-v3.3/NCoverExplorer.Console.exe
  50. +213 −0 tools/NCover-v3.3/ReportingExample.config
  51. +62 −0 tools/NCover-v3.3/Samples/ConsoleApplication/BusinessObjects/BusinessObjects.csproj
  52. +50 −0 tools/NCover-v3.3/Samples/ConsoleApplication/BusinessObjects/BusinessObjects2005.csproj
  53. +41 −0 tools/NCover-v3.3/Samples/ConsoleApplication/BusinessObjects/Customer.cs
  54. +134 −0 tools/NCover-v3.3/Samples/ConsoleApplication/BusinessObjects/Order.cs
  55. +67 −0 tools/NCover-v3.3/Samples/ConsoleApplication/BusinessObjects/OrderDetail.cs
  56. +76 −0 tools/NCover-v3.3/Samples/ConsoleApplication/BusinessObjects/Product.cs
  57. +39 −0 tools/NCover-v3.3/Samples/ConsoleApplication/BusinessObjects/Properties/AssemblyInfo.cs
  58. BIN tools/NCover-v3.3/Samples/ConsoleApplication/ConsoleApplication.doc
  59. +32 −0 tools/NCover-v3.3/Samples/ConsoleApplication/ConsoleApplication.sln
  60. +69 −0 tools/NCover-v3.3/Samples/ConsoleApplication/ConsoleTestApp/ConsoleTestApp.csproj
  61. +59 −0 tools/NCover-v3.3/Samples/ConsoleApplication/ConsoleTestApp/ConsoleTestApp2005.csproj
  62. +71 −0 tools/NCover-v3.3/Samples/ConsoleApplication/ConsoleTestApp/Program.cs
  63. +39 −0 tools/NCover-v3.3/Samples/ConsoleApplication/ConsoleTestApp/Properties/AssemblyInfo.cs
  64. +92 −0 tools/NCover-v3.3/Samples/ConsoleApplication/SampleLogic/OrderFactory.cs
  65. +138 −0 tools/NCover-v3.3/Samples/ConsoleApplication/SampleLogic/OrderTests.cs
  66. +39 −0 tools/NCover-v3.3/Samples/ConsoleApplication/SampleLogic/Properties/AssemblyInfo.cs
  67. +66 −0 tools/NCover-v3.3/Samples/ConsoleApplication/SampleLogic/SampleLogic.csproj
  68. +54 −0 tools/NCover-v3.3/Samples/ConsoleApplication/SampleLogic/SampleLogic2005.csproj
  69. +2 −0 tools/NCover-v3.3/Samples/ConsoleApplication/rebuild.cmd
  70. +2 −0 tools/NCover-v3.3/Samples/ConsoleApplication/rebuild2005.cmd
  71. +1 −0 tools/NCover-v3.3/Samples/ConsoleApplication/runcompletetest.cmd
  72. +1 −0 tools/NCover-v3.3/Samples/ConsoleApplication/runhightest.cmd
  73. +1 −0 tools/NCover-v3.3/Samples/ConsoleApplication/runlowtest.cmd
  74. +1 −0 tools/NCover-v3.3/Samples/ConsoleApplication/runmediumtest.cmd
  75. +11 −0 tools/NCover-v3.3/Samples/ConsoleApplication/runreports.cmd
  76. +4 −0 tools/NCover-v3.3/Samples/ConsoleApplication/runtests.cmd
  77. +89 −0 ...Cover-v3.3/Samples/DotNet4LanguageFeatures/CSharp4LanguageFeatures/CSharp4LanguageFeatures.csproj
  78. +39 −0 tools/NCover-v3.3/Samples/DotNet4LanguageFeatures/CSharp4LanguageFeatures/CodeContracts.cs
  79. +112 −0 tools/NCover-v3.3/Samples/DotNet4LanguageFeatures/CSharp4LanguageFeatures/DynamicType.cs
  80. +92 −0 tools/NCover-v3.3/Samples/DotNet4LanguageFeatures/CSharp4LanguageFeatures/GenericVariance.cs
  81. +46 −0 ...NCover-v3.3/Samples/DotNet4LanguageFeatures/CSharp4LanguageFeatures/NamedAndOptionalParameters.cs
  82. +73 −0 tools/NCover-v3.3/Samples/DotNet4LanguageFeatures/CSharp4LanguageFeatures/ParallelLinq.cs
  83. +67 −0 tools/NCover-v3.3/Samples/DotNet4LanguageFeatures/CSharp4LanguageFeatures/Program.cs
  84. +36 −0 tools/NCover-v3.3/Samples/DotNet4LanguageFeatures/CSharp4LanguageFeatures/Properties/AssemblyInfo.cs
  85. +20 −0 tools/NCover-v3.3/Samples/DotNet4LanguageFeatures/DotNet4LanguageFeatures.sln
  86. +78 −0 tools/NCover-v3.3/Samples/MSTest/MSTest.proj
  87. +39 −0 tools/NCover-v3.3/Samples/MSTest/MSTestSample.sln
  88. +99 −0 tools/NCover-v3.3/Samples/MSTest/SampleLogicMSTest/OrderFactory.cs
  89. +144 −0 tools/NCover-v3.3/Samples/MSTest/SampleLogicMSTest/OrderTests.cs
  90. +39 −0 tools/NCover-v3.3/Samples/MSTest/SampleLogicMSTest/Properties/AssemblyInfo.cs
  91. +67 −0 tools/NCover-v3.3/Samples/MSTest/SampleLogicMSTest/SampleLogicMSTest.csproj
  92. BIN tools/NCover-v3.3/Samples/MSTest/SampleMSTestandMSBuild.doc
  93. +43 −0 tools/NCover-v3.3/Samples/MSTest/ccnet.config
  94. +1 −0 tools/NCover-v3.3/Samples/MSTest/completetests.cmd
  95. +1 −0 tools/NCover-v3.3/Samples/MSTest/hightests.cmd
  96. +1 −0 tools/NCover-v3.3/Samples/MSTest/lowtests.cmd
  97. +1 −0 tools/NCover-v3.3/Samples/MSTest/mediumtests.cmd
  98. +1 −0 tools/NCover-v3.3/Samples/MSTest/msbuildcompletetests.cmd
  99. +1 −0 tools/NCover-v3.3/Samples/MSTest/msbuildhightests.cmd
  100. +1 −0 tools/NCover-v3.3/Samples/MSTest/msbuildlowtests.cmd
  101. +1 −0 tools/NCover-v3.3/Samples/MSTest/msbuildmediumtests.cmd
  102. +1 −0 tools/NCover-v3.3/Samples/MSTest/msbuildrunreport.cmd
  103. +2 −0 tools/NCover-v3.3/Samples/MSTest/rebuild.cmd
  104. +34 −0 tools/NCover-v3.3/Samples/NUnit/NUnitSample.sln
  105. +34 −0 tools/NCover-v3.3/Samples/NUnit/NUnitSample2005.sln
  106. +91 −0 tools/NCover-v3.3/Samples/NUnit/SampleLogicNUnit/OrderFactory.cs
  107. +154 −0 tools/NCover-v3.3/Samples/NUnit/SampleLogicNUnit/OrderTests.cs
  108. +36 −0 tools/NCover-v3.3/Samples/NUnit/SampleLogicNUnit/Properties/AssemblyInfo.cs
  109. +70 −0 tools/NCover-v3.3/Samples/NUnit/SampleLogicNUnit/SampleLogicNUnit.csproj
  110. +58 −0 tools/NCover-v3.3/Samples/NUnit/SampleLogicNUnit/SampleLogicNUnit2005.csproj
  111. BIN tools/NCover-v3.3/Samples/NUnit/SampleNUnit.doc
  112. +1 −0 tools/NCover-v3.3/Samples/NUnit/completetests.cmd
  113. +1 −0 tools/NCover-v3.3/Samples/NUnit/hightests.cmd
  114. +1 −0 tools/NCover-v3.3/Samples/NUnit/lowtests.cmd
  115. +1 −0 tools/NCover-v3.3/Samples/NUnit/mediumtests.cmd
  116. BIN tools/NCover-v3.3/Samples/NUnit/nunit.framework.dll
  117. +2 −0 tools/NCover-v3.3/Samples/NUnit/rebuild.cmd
  118. +2 −0 tools/NCover-v3.3/Samples/NUnit/rebuild2005.cmd
  119. +1 −0 tools/NCover-v3.3/Samples/WPFApplication/RunApplication.cmd
  120. +8 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/App.xaml
  121. +14 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/App.xaml.cs
  122. +54 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/Properties/AssemblyInfo.cs
  123. +62 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/Properties/Resources.Designer.cs
  124. +117 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/Properties/Resources.resx
  125. +26 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/Properties/Settings.Designer.cs
  126. +7 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/Properties/Settings.settings
  127. +108 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/SampleWPFApp.csproj
  128. +25 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/Window1.xaml
  129. +53 −0 tools/NCover-v3.3/Samples/WPFApplication/SampleWPFApp/Window1.xaml.cs
  130. BIN tools/NCover-v3.3/Samples/WPFApplication/WPFApplication.doc
  131. +32 −0 tools/NCover-v3.3/Samples/WPFApplication/WPFApplication.sln
  132. +2 −0 tools/NCover-v3.3/Samples/WPFApplication/rebuild.cmd
  133. BIN tools/NCover-v3.3/System.Data.SQLite.dll
  134. +277 −0 tools/NUnit-v2.5/NUnitFitTests.html
  135. +84 −0 tools/NUnit-v2.5/NUnitTests.config
  136. +14 −0 tools/NUnit-v2.5/NUnitTests.nunit
  137. +23 −0 tools/NUnit-v2.5/TestResult.xml
  138. +4 −0 tools/NUnit-v2.5/agent.conf
  139. +18 −0 tools/NUnit-v2.5/agent.log.conf
  140. +96 −0 tools/NUnit-v2.5/clr.bat
  141. BIN tools/NUnit-v2.5/framework/nunit.framework.dll
  142. +10,088 −0 tools/NUnit-v2.5/framework/nunit.framework.xml
  143. BIN tools/NUnit-v2.5/framework/nunit.mocks.dll
  144. BIN tools/NUnit-v2.5/framework/pnunit.framework.dll
  145. +18 −0 tools/NUnit-v2.5/launcher.log.conf
  146. BIN tools/NUnit-v2.5/lib/Failure.png
  147. BIN tools/NUnit-v2.5/lib/Ignored.png
  148. BIN tools/NUnit-v2.5/lib/Inconclusive.png
  149. BIN tools/NUnit-v2.5/lib/Skipped.png
  150. BIN tools/NUnit-v2.5/lib/Success.png
  151. BIN tools/NUnit-v2.5/lib/fit.dll
  152. BIN tools/NUnit-v2.5/lib/log4net.dll
  153. BIN tools/NUnit-v2.5/lib/nunit-console-runner.dll
  154. BIN tools/NUnit-v2.5/lib/nunit-gui-runner.dll
  155. BIN tools/NUnit-v2.5/lib/nunit.core.dll
  156. BIN tools/NUnit-v2.5/lib/nunit.core.interfaces.dll
  157. BIN tools/NUnit-v2.5/lib/nunit.fixtures.dll
  158. BIN tools/NUnit-v2.5/lib/nunit.uiexception.dll
  159. BIN tools/NUnit-v2.5/lib/nunit.uikit.dll
  160. BIN tools/NUnit-v2.5/lib/nunit.util.dll
  161. BIN tools/NUnit-v2.5/nunit-agent.exe
  162. +87 −0 tools/NUnit-v2.5/nunit-agent.exe.config
  163. BIN tools/NUnit-v2.5/nunit-console-x86.exe
  164. +87 −0 tools/NUnit-v2.5/nunit-console-x86.exe.config
  165. BIN tools/NUnit-v2.5/nunit-console.exe
  166. +87 −0 tools/NUnit-v2.5/nunit-console.exe.config
  167. BIN tools/NUnit-v2.5/nunit-x86.exe
  168. +95 −0 tools/NUnit-v2.5/nunit-x86.exe.config
  169. BIN tools/NUnit-v2.5/nunit.exe
  170. +95 −0 tools/NUnit-v2.5/nunit.exe.config
  171. BIN tools/NUnit-v2.5/nunit.framework.dll
  172. BIN tools/NUnit-v2.5/pnunit-agent.exe
  173. +87 −0 tools/NUnit-v2.5/pnunit-agent.exe.config
  174. BIN tools/NUnit-v2.5/pnunit-launcher.exe
  175. +87 −0 tools/NUnit-v2.5/pnunit-launcher.exe.config
  176. BIN tools/NUnit-v2.5/pnunit.framework.dll
  177. BIN tools/NUnit-v2.5/pnunit.tests.dll
  178. BIN tools/NUnit-v2.5/runFile.exe
  179. +43 −0 tools/NUnit-v2.5/runFile.exe.config
  180. +2 −0 tools/NUnit-v2.5/runpnunit.bat
  181. +24 −0 tools/NUnit-v2.5/test.conf
View
@@ -0,0 +1,53 @@
+task :default => ['uow:coveragereport']
+
+namespace :albacore do
+ require 'lib/albacore'
+
+ @@xml_coverage = "codecoverage/coverage.xml"
+ @@coverage_report = "codecoverage/report/"
+
+ desc "Generate version information"
+ Albacore::AssemblyInfoTask.new(:versioninfo) do |asm|
+ asm.version = "0.1.0.0"
+ asm.product_name = "UnitOfWork"
+ asm.copyright = "Copyright (C)2009 Derick Bailey. All Rights Reserved."
+ asm.output_file = "src/VersionInfo.cs"
+ end
+
+ desc "Build the UnitOfWork solution"
+ Albacore::MSBuildTask.new(:build => :versioninfo) do |msb|
+ msb.properties :configuration => :Release
+ msb.targets [:Clean, :Build]
+ msb.solution = "src/UoW.sln"
+ end
+
+ desc "Run code coverage analysis"
+ Albacore::NCoverConsoleTask.new(:coverageanalysis => :build) do |ncc|
+ ncc.log_level = :verbose
+ ncc.path_to_command = "tools/NCover-v3.3/NCover.Console.exe"
+ ncc.output = {:xml => @@xml_coverage}
+ ncc.working_directory = "build/"
+
+ nunit = NUnitTestRunner.new("tools/NUnit-v2.5/nunit-console.exe")
+ nunit.log_level = :verbose
+ nunit.assemblies << "assemblies/TestSolution.Tests.dll"
+ nunit.options << '/noshadow'
+
+ ncc.testrunner = nunit
+ end
+
+ desc "Run code coverage report"
+ Albacore::NCoverReportTask.new(:coveragereport => :coverageanalysis) do |ncr|
+ ncr.path_to_command = "tools/NCover-v3.3/NCover.Reporting.exe"
+ ncr.coverage_files << @@xml_coverage
+
+ fullcoveragereport = NCover::FullCoverageReport.new
+ fullcoveragereport.output_path = "codecoverage/report/"
+ ncr.reports << fullcoveragereport
+
+ ncr.required_coverage << NCover::BranchCoverage.new(:minimum => 50)
+ ncr.required_coverage << NCover::SymbolCoverage.new(:minimum => 50)
+ ncr.required_coverage << NCover::MethodCoverage.new(:minimum => 50)
+ ncr.required_coverage << NCover::CyclomaticComplexity.new(:maximum => 100)
+ end
+end
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,237 @@
+<Project DefaultTargets="RunManualTests" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <!-- TODO: Specify the full path to the NCover.MSBuildTasks.dll if not in your path -->
+ <UsingTask TaskName="NCover.MSBuildTasks.NCover"
+ AssemblyFile="NCover.MSBuildTasks.dll"/>
+
+
+ <PropertyGroup>
+ <NCoverPath>C:\Program Files\</NCoverPath>
+ <MSTestPath>C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\</MSTestPath>
+ <NAntTestRunner>.\Tools\nunit-console.exe</NAntTestRunner>
+ <TestDlls>.\bin\tests1.dll .\bin\tests2.dll .\bin\tests3.dll</TestDlls>
+ </PropertyGroup>
+
+ <!--
+ Simple NCover setup to run NCover on an application which is then tested manually (or by an external program).
+ This task could be used by someone in the QA department running manual tests, or if the UI test runner requires
+ the program to be started before it (the UI test runner) is launched.
+ -->
+ <Target Name="RunManualTests">
+ <!-- Assumes that the program will be exercised manually, or has some default path of execution -->
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="protoype.exe"
+ TestRunnerArgs="/clear /nologo"
+ CoverageFile="coverage\10.2.2009.xml" />
+ </Target>
+
+ <!--
+ NCover setup for running NUnit tests. Recommend use of the /noshadow flag, as NCover can have trouble
+ covering shadowcopied assemblies.
+ -->
+ <Target Name="RunNUnitTests">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ CoverageFile="coverage\nunit-tests-coverage.xml" />
+ </Target>
+
+ <!--
+ NCover setup for running MSTest (VisualStudio) tests. For NCover v2.1 and above, recommend use of
+ CoverChildProcess="VSTestHost.exe" option, as it provides the greatest compatability with MSTest tests.
+ If the CoverChildProcess option is not used, then "/noisolation" should be added to the TestRunnerArgs
+ option. However, if "/noisolation" is used, any test using the "DeploymentItem" attribute will break.
+ -->
+ <Target Name="RunMSTestTests">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(MSTestPath)mstest.exe"
+ TestRunnerArgs="/testcontainer:Debug\unittests.dll"
+ CoverChildProcess="VSTestHost.exe" />
+ </Target>
+
+ <!--
+ NCover setup for generating trend data from coverage information. Trend information is more compactly stored
+ than coverage information, but does not store source file links. Trend data works hand-in-hand with coverage
+ information to show coverage values over time.
+ -->
+ <Target Name="CreateTrendsAlongWithCoverage">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ AppendTrendTo=".\reports\project.trend" />
+ </Target>
+
+ <!--
+ Using the BuildId option, coverage data and trend data can can be associated with a particular build number.
+ -->
+ <Target Name="AssociateTrendInstancesWithBuildID">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ AppendTrendTo=".\reports\project.trend"
+ BuildId="10.2.3.103917"/>
+ </Target>
+
+ <!--
+ By default, NCover reports on all coverage types (permitted by the license). If you're not interested in
+ all of the coverage types, you can restrict the types reported on using the "CoverageType" option.
+ -->
+ <Target Name="SpecifyDesiredCoverageTypes">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ CoverageType="Symbol | CyclomaticComplexity" />
+ </Target>
+
+ <!--
+ In lieu of using the reporting tool, NCover can generate an HTML report before it exits.
+ -->
+ <Target Name="CreateHtmlReportFromCoverage">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ HtmlReportDir=".\reports\" />
+ </Target>
+
+ <!--
+ The "ProjectName" option changes the name of the project that appears on the HTML report.
+ -->
+ <Target Name="SetProjectNameOnHtmlReport">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ ProjectName="NHibernate v3.0"
+ HtmlReportDir=".\reports\v3\" />
+
+ </Target>
+
+ <!--
+ Log files are useful promarily when interacting with NCover support.
+ -->
+ <Target Name="CreateALogFile">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ LogFile="coverage.log"
+ LogLevel="Normal" />
+ </Target>
+
+ <!--
+ Often, NCover support will ask for a verbose log file, even though NCover will crash when generating
+ a verbose log on x64 machines.
+ -->
+ <Target Name="CreateAVerboseLogFile">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ LogFile="coverage.log"
+ LogLevel="Verbose" />
+ </Target>
+
+ <!--
+ Sample task for setting up coverage for a webservice or an ASP.NEt application. In both cases,
+ the test runner would have to be launched externally.
+ -->
+ <Target Name="CoverAWebserviceOrAnASP.NETApp">
+ <NCover ToolPath="$(NCoverPath)"
+ ProfileIIS="true" />
+ </Target>
+
+ <!--
+ Sample task for covering a Windows or WCF service exposed as a Windows service. Note that the
+ test runner would have to be launched externally.
+ -->
+ <Target Name="CoverAWindowsService">
+ <NCover ToolPath="$(NCoverPath)"
+ ProfileService="MyInstalledServiceName" />
+ </Target>
+
+ <!--
+ By default, NCover keeps covering a service (or IIS) until it is explicitly told to stop.
+ The "ServiceTimeout" option tells NCover to stop covering the service (or IIS) and report
+ coverage data after the specified number of seconds have elapsed.
+ -->
+ <Target Name="TellingNCoverToStopAServiceAfterACertainElapsedTime">
+ <NCover ToolPath="$(NCoverPath)"
+ ProfileService="MyInstalledServiceName"
+ ServiceTimeout="540"/>
+ </Target>
+
+ <!--
+ Far more useful for running automated tests, telling NCover to cover both an executable and a service (or IIS)
+ forces it to run in a special mode. In this mode, NCover gathers coverage from the service (or IIS) and shuts
+ the service (or IIS) down once the executable exits.
+ -->
+ <Target Name="StoppingAServiceAfterAnExeExits">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ ProfileService="MyInstalledServiceName" />
+ </Target>
+
+ <!--
+ NCover affects application startup time far more than it affects run-time. By default, NCover
+ waits one minute to recieve a "started" message from the application it covers. However,
+ larger applications can take longer than a minute to startup with NCover attached.
+ The "WaitForAppLoad" option tells NCover to wait the given number of minutes before deciding
+ that the application is a no-show.
+ -->
+ <Target Name="CoveringAServiceThatHasALongStartupTime">
+ <NCover ToolPath="$(NCoverPath)"
+ ProfileService="MyInstalledServiceName"
+ WaitForAppLoad="10" />
+ </Target>
+
+ <Target Name="UsingTypemockWithNCover">
+ <!-- Trouble using Typemock with NCover should be directed to the Typemock team first -->
+ <!-- <TypeMockStart ProfilerLaunchedFirst="true" /> -->
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow" />
+ <!-- DO NOT USE the RegisterProfiler="true" option -->
+ <!-- <TypeMockStop ProfilerLaunchedFirst="true" /> -->
+ </Target>
+
+ <Target Name="UsingSymbolsFromASymbolServer">
+ <!--
+ Need to set the "_NT_SYMBOL_PATH" environment variable for NCover to find the symbols correctly.
+ If NCover is having trouble finding the symbol server, setting "_NT_SYMBOL_PATH" to the folder
+ with PDB files and telling NCover to search for symbols on a symbolserver will usually solve the problem.
+ -->
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ SymbolSearchLocations="SymbolServer"/>
+ </Target>
+
+
+ <!-- Exclusion / Inclusion options -->
+ <!--
+ Quick breakdown of what options are available
+ : Exclusion : Inclusion
+ ====================================
+ Assembly : yes : yes
+ Type : yes : yes
+ Method : yes : NO
+ Attribute : yes : yes
+ Source File : yes : yes
+
+ By default, everything in every assembly loaded is included.
+ Inclusions are always applied before exclusions (per type).
+
+ -->
+ <Target Name="GetCoverageOnTestAssemblies">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ IncludeAssemblies=".*tests;DAL\.tests.internal"/>
+ </Target>
+
+ <Target Name="GetCoverageOnNONTestAssemblies">
+ <NCover ToolPath="$(NCoverPath)"
+ TestRunnerExe="$(NAntTestRunner)"
+ TestRunnerArgs="$(TestDlls) /noshadow"
+ ExcludeAssemblies=".*vendorsupplied.*;.*tests"/>
+ </Target>
+
+</Project>
Oops, something went wrong.

0 comments on commit 42cc87d

Please sign in to comment.