Page MenuHomePhabricator

Implement test cases for scene serialization
Closed, ResolvedPublic

Description

This is to document progress in writing test cases for scene serialization.

Related Objects

StatusAssignedTask
Wontfixkislinsk
InvalidNone
ResolvedNone

Event Timeline

Basic tests committed in rev. 18000. Creates a zip file from a freshly filled DataStorage but does not test zip file contents yet.

Forgot to actually activate the tests -- wanted a clean check-in, now it's messed. Should be right in rev. 18001.

Output lists of failed nodes/properties in rev. 18033.

Jochen, can I assign this to you? Then we would also separate testing and development :-)

Okay, I'll work on unit tests for the SceneSerialization Module.

I wrote mitkPropertySerializationTest.cpp which tests serialization and deserialization of all existing properties with ~200 subtests. I had to patch a lot of files and add some serializer and deserializer classes. See T2183 for details and commit messages.

Next, I'll work on SceneIOTest.

[SVN revision 19656]
ENH (#2185): add a PointSet for SceneSerialization.
FIX: write scene to TEMP directory, not to binary directory.

Unit tests can be written by anyone. This is now a bug squashing bug.

Assigning this to default assignee because mbi-bug-manager is not a person and cannot evaluate/reassign this bug. Would you please assign it to the correct product/component and estimate whether it is relevant for the 1.0 release? Thank you.

To clarify what needs to be done: the existing test already creates a data storage with some objects and saves it to a scene file. It still should be verified that the original data storage is restored after loading the scene file.

:-) In the change request for T3042 somebody volunteered to write the test. Since your bug list for the 1.0 release is short, could you pehaps take care of this test?

I will write a test the next days...

Is there any reason why the PropertySerializationTest is not in the configuration? It works fine for me on Windows 7 64.

(In reply to comment #13)

Is there any reason why the PropertySerializationTest is not in the
configuration? It works fine for me on Windows 7 64.

I don't know any. It should be compiled and run.

The reading part of the SceneIO test revealed that some data is not stored:

  1. surface is not stored (possible that the material property which can not be stored causes this)
  1. when saving a child node only the child is stored and no reference to the father node (even in the XML file)

(In reply to comment #15)

The reading part of the SceneIO test revealed that some data is not stored:

  1. surface is not stored (possible that the material property which can not be

stored causes this)

This is definitely an error and should be fixed.

  1. when saving a child node only the child is stored and no reference to the

father node (even in the XML file)

This is on purpose. The application provides a set of DataTreeNodes for serialization. It is meant as a feature that the application can decide to only store some child nodes without their parent node. E.g. think of storing all organ segmentations or all measurements of a CT image.

@Daniel is there a bug for the scene serialization not storing BaseDatas ?

This was not a bug. In building up the data storage was a c&p error...

[SVN revision 21268]
ENH (#2185): added check for loading datastorage; fixed bug in pointset and surface node test

The SceneIO test now has a coverage with 69%. For further improvements make checks for empty and already filled datastorage and also save render specific properties.

I am closing this as the test coverage is good enough.