Table of Contents
In the following chapter, we will introduce you to using the MeVisLab TestCenter.
Note | |
---|---|
In the following section, we only have a brief look at the concepts of the TestCenter. For detailed information and references, see the TestCenter Reference and the TestCenter Manual. |
The testing of macro modules, networks, applications and scriptable functionality in MeVisLab is done with the TestCenter.
Tip | |
---|---|
On the C++ level, GoogleTest can be used. |
What makes a test? Possible definitions:
A test compares results against expectations.
A test uses a parameterized algorithm to generate data that is compared to expected results.
A test is a specification that can easily be verified.
Two main categories of test cases can be created with the TestCenter:
Generic test cases: Tests a larger set of modules by applying a test case generically.
Functional test cases: Tests specific functionalities of a single module or network.
A test case in MeVisLab consists of
a set of test functions
input data
(optional) a network
Tip | |
---|---|
A network provides the context for a module to be tested, such as inputs/outputs/other modules for comparison. A network might be unnecessary for testing scripting functionality only, but might still be useful if you want to add a module, connect it to another module, and then remove again, etc. |
TestCases are similar to macro modules, with two differences:
They are not handled by the general module database but by a specific test case database, the MLABTestCaseDatabase.
The TestCase database must be initialized explicitly.
TestCases are located in the TestCases directories of the packages, parallel to the folders “Modules” and “Sources”.
The test case creation and management is supported by the special macro module (TestCaseManager
) which is implemented in the MeVisLab GUI and will be used in our example.
Note | |
---|---|
Test cases cannot be deleted in the TestCaseManager. To delete a test case, delete the folder of the test case on your system and click Reload All in the TestCaseManager. |
The name of a test function consists of three parts:
One of the following predefined keywords to define the test type:
TEST: a function that is executed once.
FIELDVALUETEST: a test based on interactively predefined settings of fields and comparison of computed field values with expected results.
ITERATIVETEST: a test based on a list of given parameter and a function that is executed for each parameter.
An arbitrary string used for sorting.
An arbitrary name of the function for display purposes.
© 2024 MeVis Medical Solutions AG