Skip to content

Instantly share code, notes, and snippets.

View marcel-valdez's full-sized avatar

Marcel Valdez marcel-valdez

View GitHub Profile
@marcel-valdez
marcel-valdez / Configuration for deploying a web application and testing it
Created June 28, 2012 01:45
Example Target to test a web application, considering the project contains a definition for a Deploy task
<Target Name="Test" DependsOnTargets="Build">
<!-- First we deploy the application -->
<MSBuild Targets="Deploy" Projects="WebCalc\WebCalc.csproj" ContinueOnError="false" />
<!-- Now we test the web application -->
<Exec Command="WebCalc.FunctionalTest\Deliverables\Assemblies\WebCalc.FunctionalTest.exe /site:http://localhost/WebCalc_deploy /xml=FunctionalTestReport.xml"/>
</Target>
@marcel-valdez
marcel-valdez / deploy_website
Created June 28, 2012 00:30
VS2010 Target to deploy a website using the project file
<Target Name="Deploy">
<MSBuild Projects="$(SolutionFile)"
Properties="Configuration=$(Configuration);DeployOnBuild=true;DeployTarget=Package"
ContinueOnError="false" />
<Exec Command="&quot;$(ProjectPath)\obj\$(Configuration)\Package\$(ProjectName).deploy.cmd&quot; /y /m:$(DeployServer) -enableRule:DoNotDeleteRule"
ContinueOnError="false" />
</Target>
@marcel-valdez
marcel-valdez / ccnet_opencover_merge.config
Created June 26, 2012 08:14
CruiseControl.Net server config for merging the OpenCover + ReportGenerator Xml Summary
<publishers>
<merge>
<files>
<file>coverage-report\Summary.xml</file>
</files>
</merge>
<xmllogger />
</publishers>
@marcel-valdez
marcel-valdez / dashboard_opencover_integration.config
Created June 26, 2012 08:10
Configuration for the CruisControl.Net WebDashboard dashboard.config file
<buildPlugins>
<buildReportBuildPlugin>
<xslFileNames>
<xslFile>xsl\OpenCoverReport.Assembly.xsl</xslFile>
</xslFileNames>
</buildReportBuildPlugin>
<buildLogBuildPlugin />
<xslReportBuildPlugin description="OpenCover Report" actionName="OpenCoverBuildReport" xslFileName="xsl\OpenCoverReport.Class.xsl"></xslReportBuildPlugin>
</buildPlugins>
@marcel-valdez
marcel-valdez / ClassXSLTForOpenCOver.xsl
Created June 26, 2012 08:07
Class level XSLT Transform for ReportGenerator Summary from OpenCover
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt">
<xsl:output method="html" indent="no"/>
<xsl:template match="/">
<xsl:variable name="cov0style" select="'background:#FF4040;text-align:right;'"/>
<xsl:variable name="cov20style" select="'background:#F06060;text-align:right;'"/>
<xsl:variable name="cov40style" select="'background:#E78080;text-align:right;'"/>
<xsl:variable name="cov60style" select="'background:#E0A0A0;text-align:right;'"/>
@marcel-valdez
marcel-valdez / OpenCoverXSLT
Created June 26, 2012 08:06
XSLT for transforming ReportGenerator output from OpenCover coverage report
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<xsl:variable name="cov0style" select="'background:#E79090;text-align:right;'"/>
<xsl:variable name="cov20style" select="'background:#D79797;text-align:right;'"/>
<xsl:variable name="cov40style" select="'background:#D7A0A0;text-align:right;'"/>
<xsl:variable name="cov60style" select="'background:#C7A7A7;text-align:right;'"/>
<xsl:variable name="cov80style" select="'background:#C0B0B0;text-align:right;'"/>
<xsl:variable name="cov100style" select="'background:#D7D7D7;text-align:right;'"/>
@marcel-valdez
marcel-valdez / msbuild-coverage-target
Created June 26, 2012 08:03
Coverage target for msbuild
<Target Name="Coverage" >
<Exec Command=".\tools\OpenCover\OpenCover.Console.exe -register:user -target:.\tools\nunit\bin\nunit-console.exe &quot;-targetdir:MyTestProjectDir\bin\$(Configuration)&quot; &quot;-targetargs:MyTestAssembly.Test.dll&quot; -output:OpenCoverReport.xml &quot;-filter:+[MyProjectNamespace*]* -[MyProjectNamespace.Test*]*&quot;" />
<Exec Command=".\tools\reportgenerator\ReportGenerator.exe -reports:OpenCoverReport.xml -targetdir:.\coverage-report -reporttypes:XML;HTML" />
</Target>