BuildAutomation/coverage.xml

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" name="Application.CodeCoverage" default="CodeCoverage.Execute">	
	
	<loadtasks assembly="..\lib\External\NCoverExplorer.Extras\1.3.6\NCoverExplorer.NAntTasks.dll" />
	
	<include buildfile="${args.settings.file}" />
	
	<!-- ****************************************************************************************
		<summary>Runs the coverage tests.</summary>
	      **************************************************************************************** -->
	<target name="CodeCoverage.Execute">
		<call target="CodeCoverage.CheckArguments" />
		<call target="CodeCoverage.ExecuteCoverage" />
		<call target="CodeCoverage.ExecuteNCoverexplorerReportGeneration" />
	</target>
	
	
	<!-- ****************************************************************************************
		ncover task is located in  lib\External\NCoverExplorer.Extras\1.3.6 
                 **************************************************************************************** -->
	<target name="CodeCoverage.ExecuteCoverage">
		
		<ncover program="${coverage.tool.path}"
            commandLineExe="${coverage.command}"
            commandLineArgs="${coverage.commandargs}"
            workingDirectory="${coverage.workingDir}"
            assemblyList="${coverage.assemblies}"
            coverageFile="${coverage.outputDir}\${coverage.xmlResultsFile}"
            logLevel="Normal"
		/>
	</target>
	
	
	<!-- ****************************************************************************************
		<summary>Executes the coverage via unit test project.
		ncover.console.exe 
			nunit-console.exe application.nunit /config=Debug 
			//w "C:\kishore\bus\Cab\Neekho\tests\Neekho.Apps.Tests\Neekho.WinApp\bin\Debug" 
			//a Neekho.BusinessLogic;Neekho.BusinessLayer.Tests
			//x ncover.results.xml
		</summary>
	      **************************************************************************************** -->
	<target name="CodeCoverage.ExecuteCoverageViaExec">
		
		<property name="coverage.tool.commandargs" value="${coverage.command} ${coverage.commandargs}" />
		<property name="coverage.tool.commandargs" value="${coverage.tool.commandargs} //w &quot;${coverage.workingDir}&quot;" />
		<property name="coverage.tool.commandargs" value="${coverage.tool.commandargs} //a &quot;${coverage.assemblies}&quot;" />
		<property name="coverage.tool.commandargs" value="${coverage.tool.commandargs} //x &quot;${coverage.xmlResultsFile}&quot;" />
		
		<echo message="RUNNING COVERAGE IN ${coverage.workingDir} WITH ARGUMENTS...${coverage.tool.commandargs}"/>
		
		<exec program="${coverage.tool.path}"
				workingdir="${coverage.workingDir}" 
				failonerror="false" resultproperty="coverage.result"
				commandline='${coverage.tool.commandargs}' />
		
		<!-- Check the results and fail if necessary -->
		<echo message="coverage result code : ${coverage.result}"/>
        <!-- <fail message="Failures reported in coverage tests." unless="${int::parse(coverage.result)==0}" /> -->
		
	</target>
后面还有 83 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。