Watch where you put Received when working with NSubstitute 22 July 2020 Donovan Work (0) In this post we will talk about a very easy mistake to make when working with NSubstitute. [More]
Where are My Test Results? 09 April 2017 Donovan Work (8) In this post I show you how to publish your tests results using the ASP.NET Core (Preview) template. [More]
No more excuses 12 December 2016 Donovan Work (1) In this post I talk about the importance of unit tests. [More]
I can’t test for a null or empty string with Pester 01 January 2016 Donovan-Brown Work (0) This post I show how to test for a null or empty string with Pester. [More]
How to fake IDbSet using Microsoft Fakes 13 July 2015 Donovan-Brown Work (0) How to fake IDbSet using Microsoft FakesWhile preparing to record a Microsoft Virtual Academy course [More]
How do I remove test projects from code coverage in Visual Studio 2012 15 September 2013 Donovan-Brown Work (0) Problem: My code coverage results include my test project classes. Solution: Apply the ExcludeFromCodeCoverage attribute to your unit test classes.
How to mole System.dll 15 December 2011 Donovan-Brown Work (0) Problem: I get “no suitable method found to override” errors when I mole system.dll. Solution: Modify the System.moles file in your project and exclude everything except the types you are trying to mole. Explanation: I was trying to mole the SerialPort class in System.IO.Ports. After adding the mole for System.dll I began to get “no suitable method found to override” errors. To resolve this issue I simply double clicked the System.moles file to open it in my IDE. Then I modified the file so that moles were created only for the types under System.IO. Change System.moles from this: <Moles xmlns="http://schemas.microsoft.com/moles/2010/"> <Assembly Name="System" /></Moles> to this: <Moles xmlns="http://schemas.microsoft.com/moles/2010/"> <Assembly Name="System" /> <StubGeneration> <Types> <Clear /> <Add Namespace="System.IO!" /> </Types> </StubGeneration></Moles>
How to enable code coverage in my Team Build 03 October 2011 Donovan-Brown Work (0) Problem: I am not getting code coverage results in my build. Solution: Ensure you have a test settings file selected in your build definition. Explanation: On the process tab of your build definition expand the Automated Testing section under Basic and make sure the TestSettings File is pointing to the test settings file that has code coverage configured. You can watch a video below that demonstrates how to do this.
Lap around dev vsts 2010 dev tools 02 June 2010 Donovan-Brown Work (0) Lap around the VSTS Dev Testing Tools [More]
Demo Source Code 11 February 2010 Donovan-Brown Work (0) For those that wanted the demo code I presented today in the Web Cast it is here. It includes the code to databind a Coded UI Test. Thanks for joining me and I hope you enjoyed it. Demo.zip (408.41 kb)