So I'm interested in hearing different thoughts about what is the best way to go about unit testing XNA Game/Applications. Astute googlers can probably figure out why I'm asking, but I didn't want to bias the topic :-)
相关问题
- Dependencies while implementing Mocking in Junit4
- How to unit test a reactive component where ngCont
- Is it possible to restore a GraphicsDevice if some
- Access for global variables JavaScript unit testin
- Googletest Parametrized tests crash
相关文章
- How to replace file-access references for a module
- How to mock methods return object with deleted cop
- What is a good way of cleaning up after a unit tes
-
EF6 DbSet
returns null in Moq - React testing library: Test attribute / prop
- React/JestJS/Enzyme: How to test for ref function?
- python unit testing methods inside of classes
- Running into System.MissingMethodException: Method
The Microsoft testing framework is now available in Visual Studio 2008 Professional and up. If you have this software you already have all the software that you need to start testing your games.
Here are two links that will get you started: Unit tests Overview - http://msdn.microsoft.com/en-us/library/ms182516.aspx Creating Unit Tests - http://msdn.microsoft.com/en-us/library/ms182523.aspx
If you only have the Visual Studio 2008 Express than you need to use some other testing framework. NUnit is probably the best one, some people even prefer it to MSTest.
After you have all the software you need you can start adding tests for your code. Here I've posted some basic techniques about unit testing games that you might find useful.
Have you done unit testing before? If you haven't I could posbily give you some more hints and resources
VS2008 has a nicely integrated unit testing framework. (I assume you're using using the XNA 3.0 CTP with your Zune.)
XNA BOOK
This book shows how to code in XNA but the entire book is based on NUNIT testing. So while you are coding the projects in the book, he also shows you how to write the scripts for NUNIT to test the XNA code.
You should give Scurvy Test a try. Have not used it my self but it looks promising.
I know this is an old post, but for other people wondering how to best go about testing their XNA Games, there is another option. The built-in testing in Visual Studio is definitely great, but is not well suited for games. Everytime a value is needed, you have to pause the game, and then either hover over the variable, go to quick watch, or add a watch. Then you can see the value of the variable at that frame. To see the value again during another frame, you must pause your game, again. This can be a big hassle. Therefore I have created a debugging terminal to run on top of your game. It allows you to see values of variables, invoke methods, and even watch a variable change in real-time all while you game is running! To find out more, visit: http://www.protohacks.net/xna_debug_terminal/
The project is completely free and open source. If you like it, feel free to tell others using XNA Game Studio about it. Hopes this helps out!
I would that this question is geared more toward the approach of unit testing in game development. I mean, XNA is a framework. Plug in NUnit, and begin writing test cases while you develop.
Here is a post on SO about unit testing a game. It'll give you a little insight into how you need to think while progressing.