DCSIMG
TDD - Doron's .NET Space

Browse by Tags

All Tags » TDD (RSS)

Running VSTS tests without mstest.exe

I’ve been looking at ways to run VSTS tests without using the actual Visual Studio testing framework. It all started when I wanted to integrate code-coverage in our TeamCity daily build. All the solutions I found were using the NUnit runner for this, and while I could have used mstest.exe to run the tests when I’m gathering code-coverage, I didn’t want to. Why? Well, because: TeamCity doesn’t use it to run the tests, so I might get different result from the regular test-run and the code-coverage...
Posted by dorony | 3 comment(s)
תגים:

It's in Your Blood

This weekend I wrote a simple helper application that is supposed to divide a file with several SQL-scripts to several files. Nothing serious, but the work gave me two insights. The first one is, that it always, always , takes me half a day to re-learn the Regular Expression syntax. No matter how many times I used them, the next I'll need them I will still stare at the MSDN examples trying to figure out what's going on here. These magical strings are so goddamn incomprehensible. The second...
Posted by dorony | with no comments
תגים:

Implementing TDD: Advice from the Battlefield

Changes are hard. I recently mentioned that. But changes are also necessary. I will now share with you some advice I have about the subject of implementing a change - starting to use unit-tests and TDD at your workplace. You should have some experience with unit-tests yourself before moving your entire team to TDD. Is the architecture your team using even testable? Can you understand the usage of a mocking framework? If you don't come with the knowledge to the team, you're in a world of hurt...
Posted by dorony | 2 comment(s)
תגים:,

Failure is a Friend

I'm a forgetful person. I almost never leave a room without coming back to it to take something I left behind. I tend to forget birthdays and other important events. And so I worked up little mechanisms to help me remember stuff, such as writing everything down, and setting reminders in my cell for phone-calls I need to remember to make. One issue I always had, was going back to a certain piece of code I'm writing, a day or two later. I waste at least 10 minutes trying to remember what exactly I...
Posted by dorony | with no comments
תגים:,

NUnit vs. VSTS: VSTS Wins

As I've said before, our team has begun doing unit testing. At first we used NUnit and NCover for this purpose, although we have VSTS licenses. This was for the following reasons: NUnit is faster than VSTS (and that test panel really slows down the IDE... Like it isn't slow enough!). NUnit has more features than VSTS (although for now we're using only the basics anyway) and less bugs. NUnit has more support and lots of googleable knowledge. It is definitely the more mature solution. NUnit feels more...
Posted by dorony | with no comments
תגים:,

The trouble with Coverage of GAC Installed Assemblies

My team is starting to get into the whole unit-testing approach, and the first thing we're doing is adding unit-tests for the infrastructure assemblies. So I've written up some unit-tests, which I ran using NUnit and the wonderful TestDriven.NET Visual Studio tool, and the next thing I did was trying to test the coverage for said assembly, using NCover (again, by using TestDriven.NET's test with... coverage option). When the results were opened in NCoverExplorer, I was very surprised to get no coverage...
Posted by dorony | with no comments
תגים:,

Unit Testing is Fun

As I've said in a previous post, I've been playing with unit-testing lately, trying to write up some classes and tests for them as I go along. I found this to be a really enjoyable experience. The tests help me understand what's going on in my code better, and they actually make me write better, and more correctly-structured code. Coupled code with too many dependencies is hard to test - by having to write tests as I go along I somehow force myself to think of a better design. This also made me feel...
Posted by dorony | with no comments
תגים: