Chocolatey machine setup

https://gist.github.com/chrismckelt/3884f94078a7bd3a773b   #Administrator privileges check If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(` [Security.Principal.WindowsBuiltInRole] “Administrator“)) { Write–Warning “You do not have Administrator rights!`nPlease run the build shell as administrator!“ exit } $scriptPath = $MyInvocation.MyCommand.Path $scriptDirectory = Split–Path $scriptPath $customDir […]

XUnit Ignore test at runtime (with SpecFlow tag @IgnoreLocally)

XUnit Ignore test at runtime (with SpecFlow tag @IgnoreLocally) Code –> https://github.com/chrismckelt/XUnit.OptionallyIgnore NuGet –> https://www.nuget.org/packages/Xunit.SpecFlow.AssertSkip/ As Xunit has no Assert.Ignore() using the OptionallyIgnoreTestFactAttribute attribute on a method and setting McKeltCustom.SpecflowPlugin.Settings.IgnoreLocally == true will ignore the test […]

NANT CruiseControl NUnit – How to get unit tests running and displaying on the build server

<target name=”webtest” haltonfailure=”false” failonerror=”true”> <echo message=”Running unit tests”/> <echo message=”${project.local.folder}”/> <property name=”test_dll_folder” value=”${project.local.folder}\McKelt.Tests\bin\Debug\”/> <exec failonerror=”true” program=”${nunit-console.exe}” workingdir=”${project.local.folder}” verbose=”true” append=”true” commandline=”${test_dll_folder}McKelt.Tests.dll /xml=${test_dll_folder}TestResults.xml /output=${test_dll_folder}TestOutput.txt /err=${test_dll_folder}TestErrorOutput.txt”> </exec> <echo message=”– TEST COMPLETE — “/> </target>   Follow these instructions […]