Unit testing with XNA Game StudioAnd now a bit of Developer's Notebook-ery. I have lately been learning the ropes of XNA Studio, Microsoft's free-beer framework for game development. It's especially helpful for those interested in creating software for the XBox 360 game console. After spending some time doodling the basic class structures needed for the particular project I have in mind, it was time for me to write some tests. Since reading Damian Conway's excellent Perl Best Practices, I've been a devotee of test-driven development: a software-creation work cycle where the programmers write tests for their code even before they write they code being tested. So you start with a bunch of tests that all fail, and you know your job is done when, however many work-hours later, they all pass. And then you keep those tests handy, so that they'll bark at you if any new code-change you introduce causes older code to break. This is all very good stuff, and I can't imagine working any other way, now. But while I know all about writing tests in Perl on Unix, I knew next to nothing doing it with C# on Windows. A friend pointed me at NUnit, a Windows-programming port of a popular unit-testing framework from the Java world. Well, great, sez I; sounds perfect. But getting it to actually work for me was a chore. Here is what eventually worked for me.
I found that trying this with the v2.4 NUnit stuff resulted in a dialog box full of verbiage that I'm currently too Windows-ignorant to grok, but there clearly seemed to be some kind of version mismatch afoot. I got the same message when I tried installing the latest version of NUnit directly. And I haven't been able to get Testdriven.Net itself working - it's supposed to integrate with Visual Studio itself. I am led to understand, though, that the fact I'm using Express versus a commercial edition may be an obstacle here. I'm curious if things would have been easier if I were using Visual C# 2008 Express, instead of the 2005 version. But, it all works well enough for the nonce. 7 CommentsLeave a comment |
|
Brilliant work. I constantly come across truly exceptional posts here on your site.
Much thanks for the help!
Awesome work. I typically come across highly terrific content pieces here on your blog page.
Couldnt be written any better. Reading this column reminds me of my old room mate! He each timekept discussionregarding this. I'll forward this informative article to him. Pretty sure he will have an superbread. Gratitude 4 sharing!
Amazing, la información realmente excelente. Su blog es realmente impresionante. Me marcado esta y volverá una vez más.
Appleseed Software Consulting |
Blog | Unit testing with XNA Game Studio
I just couldnt leave your website before letting you know that we really enjoyed the quality information you offer to your visitors... Will be back soon to check up on new posts
not bad production I think it is nice.