Test coverage report - MotionTooler/MotionToolsWiki GitHub Wiki
Since Unity does not support code coverage, we will provide a proper test coverage report here. The report shows code tested as follows:
MethodToTest(Arguments)
- MethodTestedByTest()
If some methods or classes are not tested, this will be explained.
Automatic coverage tools help us show the coverage for some classes that are completely disconnected from Unity. The summary of automatic coverage tools report are displayed in the following image. Note that the total coverage is not representative for the actual code coverage percentage.
Filter, 2/2 classes tested
Code coverage: 100%
ButterworthFilter(int samplingFrequency, int order, int cutoffFrequency)
- Implicitly tested by all other tests
Fs { get; set; }
- TestFsChange(), TestFsChangeZeroException()
Order { get; set; }
- TestOrderChange(), TestOrderChangeZeroException(), TestOrderChangeUnevenException()
CutoffFrequency { get; set; }
- TestCutoffFrequencyChange(), TestCutoffFrequencyChangeZeroException()
Apply(float)
- TestWaves(string, int, int, int)
Code coverage: 100%
TimeShiftingFilter.get_Order
- TimeShiftingFilterTests.TestCorrectOrder()
TimeShiftingFilter.set_Order
- TimeShiftingFilterTests.TestCorrectOrder()
, TimeShiftingFilterTests.TestNegativeOrder()
, TimeShiftingFilterTests.TestOddOrder()
TimeShiftingFilter..ctor()
- all tests in TimeShiftingFilterTests
TimeShiftingFilter.Apply(float)
- TimeShiftingFilterTests.TestOrderEightWithNoScopeChange()
, TimeShiftingFilterTests.TestDecreaseOrder()
, TimeShiftingFilterTests.TestIncreaseOrder()
This is an interface which can not be tested.
GenericAnimator, 2/3 classes tested
Code coverage: 100%
FullHumanToNeuronValueConverter()
- Implicitly tested by all other tests
InitializeHipsValues(HumanToNeuronValueConverter)
- TestHumanToNeuronFactoryHips()
InitializeLegValues(HumanToNeuronValueConverter)
- TestHumanToNeuronFactoryLegs()
InitializeSpineValues(HumanToNeuronValueConverter)
- TestHumanToNeuronFactorySpine()
InitializeArmValues(HumanToNeuronValueConverter)
- TestHumanToNeuronFactoryArm()
InitializeToesValues(HumanToNeuronValueConverter)
- TestHumanToNeuronFactoryToes()
InitializeEyeValues(HumanToNeuronValueConverter)
- TestHumanToNeuronFactoryEyes()
InitializeJawValues(HumanToNeuronValueConverter)
- TestHumanToNeuronFactoryJaw()
InitializeLeftFingersValues(HumanToNeuronValueConverter)
- TestHumanToNeuronFactoryLeftFingers()
InitializeRightFingersValues(HumanToNeuronValueConverter)
- TestHumanToNeuronFactoryRightFingers()
InitializeUpperChestValues(HumanToNeuronValueConverter)
- TestHumanToNeuronUpperChest()
InitalizeLastBoneValues(HumanToNeuronValueConverter)
- TestHumanToNeurorLastBone()
Code coverage: 100%
HumanToNeuronValueConverter(int)
- Implicitly tested by all other tests
Convert(HumanBodyBones)
- Implicitly tested by all other tests, TestOutOfBoundsNewConverion(), TestOutOfBoundsConverion()
AddConvertValue(HumanBodyBones, params NeuronBones[])
- TestConverterOneValue(), TestConverterMultipleValues(), TestConverterMultipleConversionsFirstValue(), TestConverterMultipleConversionsSecondValue()
AddConvertValues(IDictionary<HumanBodyBones, IEnumerable<NeuronBones>>)
- TestConverterDictionaryInsert()
This is an interface which can not be tested.
Code coverage: 0%
This can not be tested because all the functionality of this depends on constant BVH data stream from Neuron Axis. It was proven too difficult to replicate this data and so we decided not to test this class.
GenericCollider, 1/1 classes tested
Code coverage: 50% This class is closely related to Unity and so the test report can't be automatically generated. We have thoroughly tested the methods to ensure proper functionality.
AddSkeletonColliders(Animator, int)
- TestRecursiveAddedColliderAmountFullSkeleton(), TestRecursiveAddedColliderAmountPartialSkeleton(), TestRecursiveAddCollidersTwice(), TestSkeletonWithoutAnimatorAdd(), TestEmptyAnimatorAdd()
RemoveSkeletonColliders(Animator)
- TestRecursiveRemovedColliderAmount(), TestSkeletonWithoutAnimatorRemove(), TestEmptyAnimatorRemove()
AddSkeletonColliderRenderers(Animator, Color)
- Not yet implemented, not yet tested
RemoveSkeletonColliderRenderers(Animator)
- Not yet implemented, not yet tested
GenericUtilities, 1/1 classes tested
Code coverage: 100% This class is closely related to Unity and so the test report can't be automatically generated. We have thoroughly tested the methods to ensure proper functionality.
AddCapsuleCollidersRecursively(Transform, int)
- AddCapsuleCollidersRecursivelySerialTest(), AddCapsuleCollidersRecursivelyDepthTest(), AddCapsuleCollidersRecursivelyDepthChildTest(),
AddCapsuleColliders(Transform, Transform, int)
- AddCapsuleCollidersAmountTest(), AddCapsuleCollidersTypeTest(), AddCapsuleCollidersTypeTestFirstChild(), AddCapsuleCollidersHeightTest(), AddCapsuleCollidersRadiusTest()
RemoveCollidersRecursively(Transform)
- RemoveCollidersRecursivelySerialTest(), RemoveCollidersRecursivelyTwoObjectsDepthTest(),
RemoveColliders(Transform bone)
- RemoveCollidersTwoObjectsTest(), RemoveCollidersTwoObjectsSerialTest(), RemoveCollidersTwoObjectsDepthTest(),
AddCapsuleColliderWithChilds(Transform sourceBone)
- AddCapsuleColliderWithChildsTest(), AddCapsuleColliderWithChildsWithoutChildsTest()
AddCapsuleColliderToFurthestChild(Transform)
- AddCapsuleColliderToFurthestChildTest(), AddCapsuleColliderToFurthestChildHeightTest(), AddCapsuleColliderToParentWithoutChilds(), AddCapsuleColliderToFurthestChildHeightWithoutChildsTest(), AddCapsuleColliderToFurthestChildRadiusWithoutChildsTest()
Mocap, 0/7 classes tested
This code is from the NeuronSDK, we will not be testing this as it is not our code.Utilities, 2/4 classes tested
Code coverage: 100%
LoadAsset<T>(string, OnSuccess<T>)
- TestDelegate()
LoadAsset<T>(string)
- TestLoadAsset(), TestLoadEmptyString(), TestLoadNull()
This code is still from the NeuronSDK, we will not be testing this as it is not our code.
Code coverage: 100%
ClassifierTrainerSettings.Enable()
- ClassifierTrainerSettingsTests.TestEnable
Not tested since it depends on sample data, and we do not have a good oracle to verify our results with.
HandDataRecording, 0/1 classes tested
Heavily depends on unity message and file input/output. Therefore not unit tested.
Classifier, 3/3 classes tested
Code coverage: approximately 100% as this class is dependent on Unity
Classify(HandRotations data)
- TestNullRotation(), TestRecognizeClamping(), TestRecognizeNoClamping()
Code coverage: 100%
MarkovClampClassifier..ctor(string)
- all tests in MarkovClampClassifierTests
MarkovClampClassifier..ctor(ICollection<double[][]>, ICollection<double[][]>)
- MarkovClampClassifierTests.TestLearningUnClamped()
, MarkovClampClassifierTests.TestLearningUnClamped
MarkovClampClassifier.Classify(HandRotations)
- MarkovClampClassifierTests.TestLearningUnClamped()
, MarkovClampClassifierTests.TestLearningUnClamped
MarkovClampClassifier..ctor(ICollection<double[][]>, ICollection<double[][]>)
- MarkovClampClassifierTests.TestLearningUnClamped()
, MarkovClampClassifierTests.TestLearningClamped
Code coverage: 100%
MarkovClampClassifier..ctor()
- all tests in NullClassifierTests.TestDefaultConstuctor
MarkovClampClassifier..ctor(TClass value)
- NullClassifierTests.TestDefaultValueConstuctor
MarkovClampClassifier.Classify(TData data)
- NullClassifierTests.TestDefaultConstuctor
, NullClassifierTests.TestDefaultValueConstuctor
This is an interface which can not be tested.
Clampers, 1/2 classes tested
Code coverage: 0% not tested because all methods in this class are empty.
Code coverage: approximately 100% as this class is dependent on Unity
ApplyClamping(IClassifier<HandRotations, HandClassification> classifier, Animator animator, IList<IClampableGameObject> clampableGameObjects)
-
TestClampWhenCloseAndGrip(), TestNoClampWhenFarAndGrip(), TestNoClampWhenCloseAndNoGrip(), TestNoClampWhenClampingFalse, TestNoClampWhenNoClampBone()
This is an interface which can not be tested.
This is an interface which can not be tested.
Controllers, 4/4 classes tested
This is an interface which can not be tested.
AddAnimators()
- TestAddAnimator(), TestAddTwoAnimators()
RemoveAnimators()
- TestRemoveAnimator(), TestRemoveNoAnimator()
This is an interface which can not be tested.
AddColliders()
- TestAddColliders()
RemoveColliders()
- TestRemoveColliders()
GetGeneralLayer()
- TestGetGeneralLayer()
SetGeneralLayer(int)
- TestSetGeneralLayer()
GetBoneLayer()
- TestGetBoneLayer()
SetBoneLayer(int)
- TestSetBoneLayer()
This is an interface which can not be tested.
AddRigidBodies()
- TestAddRigidBodies(), TestAddRigidBodiesTwice()
RemoveRigidBodies()
- TestRemoveRigidBodies(), TestRemoveNoRigidBodies()
This is an interface which can not be tested.
UpdateSelectables(IEnumerable<GameObject>)
- TestUpdateSelectables()
RemoveSelection(GameObject)
- TestRemoveSelection(), TestRemoveNotSelectedSelection()
InvertSelection()
- TestDeselectAll()
SelectAll()
- TestInverseSelection()
DeselectAll()
- TestSelectAll()
Selectables()
- TestSelectables()
SelectedNonHumanoid()
- TestSelectNonHumanoid(), TestSelectNoNonHumanoid()
Crawler, 1/2 classes tested
This is an interface which can not be tested.
Code coverage: 100%
Crawl(GameObject value)
- Implicitly tested by all other tests
CrawlUp(GameObject value)
- TestCrawlUp(), TestCrawlUpAndDown()
CrawlDown(GameObject value)
- TestCrawlDown(), TestCrawlUpAndDown()
CheckCrawlCondition(GameObject value)
- Implicitly tested by all other tests