Monogame: Add Unit Tests for Model Classes

Created on 2 Apr 2016  路  9Comments  路  Source: MonoGame/MonoGame

We need to add some unit tests which cover the following classes:

  • Model
  • ModelMeshPart
  • ModelEffectCollection
  • ModelMesh
  • ModelBone
  • ModelMeshPartCollection
  • ModelBoneCollection
  • ModelMeshCollection

A simple test that renders a static model and a skinned model should be enough to raise the code coverage on these types from 0% to around 90%.

Help Wanted Testing

All 9 comments

Bump! Almost a year later and no one has taken these on for testing. :(

I have an experience with C# and unit testing, let me worm up with this one :)

@siudeks, If you need any pointers regarding the API or any internals of MG feel free to send me a message on gitter or the community forums, glad to help out wherever :)

Hi guys, i'm trying to create for scratch a very simple example - 3d box using Model class. The goal is use it under unit tests.
Before reinventing the wheel - maybe you have a simple example of how to create simple 3d model with Model class programatically?

Ignore my prev request - I just created a 3D box in blender, exported them and checking it's Model structure to reimplement them manually for testing purpose.

@tomspilman new pull request ready for review.

Hi, is the issue solved with the commit of @siudeks ?

_Sent from my WIKO U FEEL using FastHub_

Guys, last time when I was working on code coverage, my personal issue was lack of tools to measure code coverage. Visual Studio does not provide cc numbers (excluding Enterprise edition). How do you test cc in project?

We don't have anything set up, but would be nice to hook code coverage into the tests for local testing as well as on the build bots.

Was this page helpful?
0 / 5 - 0 ratings