TestCaseManager¶
-
MacroModule
¶ genre Test
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition TestCaseManager.def keywords testing
,functional
Purpose¶
Detailed documentation about the TestCaseManager and the TestCenter can be found on the MeVisLab Help Overview page.
See Developing a Test Case
and TestCenter Manual
.
Parameter Fields¶
Field Index¶
Visible Fields¶
Python Coverage¶
-
name:
pythonCoverage
, type:
Enum
, default:
Disabled
¶ If checked, for each test a coverage report will be generated for all utilized python modules loaded so far.
Note
The Python coverage report might list modules from the python cache that have been used earlier but are not relevant for the current test. Only the initialization code of the unrelated modules will be shown as executed in the report. Technically speaking this is correct because all modules from the cache are reloaded before each test run. At this point it is not possible to distinguish between the modules relevant for the test and other modules.
To avoid this problem you can use ‘Secure testing’ which starts a new MeVisLab instance for each test and thus has a clean python cache.
Values:
Title | Name | Deprecated Name |
---|---|---|
Disabled | Disabled | FALSE |
Per Test Case | PerTestCase | TRUE |
Global | Global |
Bullseye coverage¶
-
name:
bullseyeCoverage
, type:
Bool
, default:
FALSE
¶ Only works correctly with SecureTesting switched on. If checked, for each test the currently instrumented codes in the COVFILE are used to measure coverage values on a per-test basis. For this to work you need Bullseye Coverage installed and the path to its binaries in your PATH environment variables.
Secure testing¶
-
name:
secureTesting
, type:
Bool
, default:
FALSE
¶ Start a separate MeVisLab process for running the test(s).
This uses the settings
Always use current MeVisLab
,MeVisLab Path
,Options
,Compile mode
, andUse MESA for secure testing
from the Configuration tab.
Use MESA for secure testing¶
-
name:
useMesaForSecureTesting
, type:
Bool
, default:
FALSE
¶ If this option is on, MeVisLab will try to use the MESA software OpenGL driver when running tests in
Secure testing
(instead of the system-supplied driver). This only works on Windows.
Stop and inspect network on error¶
-
name:
stopOnError
, type:
Bool
, default:
FALSE
¶ If checked, the test execution stops on the first error and the active test network is opened in MeVisLab.
Log info messages¶
-
name:
logInfoMessages
, type:
Bool
, default:
TRUE
¶ If checked, all informational messages are logged.
Reload Python modules when test cases reload¶
-
name:
shouldReloadPythonModulesWhenReloadingTestCases
, type:
Bool
, default:
TRUE
¶
Timestamp format¶
-
name:
reportTimestampConfig
, type:
String
, default:
_%y_%m_%d__%H_%M
¶ See Python’s strftime function for help.
Format¶
-
name:
jUnitFormat
, type:
Enum
, default:
proprietary
¶ Defines the number of the resulting report files and the used format.
Values:
Title | Name | Description |
---|---|---|
Proprietary | proprietary | One report file for each test case is created. The test case name is used as file name. The report format is JUnit like: <testsuites errors="0" failures="0" name="NameOfTheTestCase" skipped="0" tests="4" time="0.5">
<testsuite errors="0" failures="0" name="TEST001_Test_Function" skipped="0" tests="2" time="0.5">
<testcase name="Some logging written by the test" />
...
</testsuite>
...
</testsuites>
|
JUnit | junit | All test case results are written to one JUnit file named junitOutput.xml. The report format is JUnit which can be used in Jenkins: <testsuites tests="4" errors="0" failures="0" time="0.5">
<testsuite tests="4" failures="0" errors="0" skipped="0" time="0.5" name="NameOfTheTestCase">
<testcase name="TEST001_Test_Function" time="0.5">
<system-out>All logging written to std-out by the test</system-out>
<system-err>All logging written to err-out by the test</system-err>
<failure>All logging that indicates a test failure (e.g. from an EXPECT_EQ())</failure>
<error>All logging that indicates an unexpected test error (e.g. a crash)</error>
</testcase>
...
</testsuite>
...
</testsuites>
|
Max Info Messages Per Test Function¶
-
name:
maxInfoMessagesPerTestFunction
, type:
Integer
, default:
0
¶
Max Error Messages Per Test Function¶
-
name:
maxErrorMessagesPerTestFunction
, type:
Integer
, default:
0
¶
Always use current MeVisLab¶
-
name:
cfgUseCurrent
, type:
Bool
, default:
TRUE
¶ If this option is set, the path from
MeVisLab Path
is ignored. Instead the MeVisLab from which the test center is called is used.This should usually be on. Only if you explicitly want to run tests in/from a different MeVisLab installation - or if path detection fails for some reason - should this be switched off.
MeVisLab Path¶
-
name:
cfgExecutable
, type:
String
, persistent:
no
¶ Path to the installed MeVisLab. Is ignored if
Always use current MeVisLab
is set.
Options¶
-
name:
cfgOptions
, type:
String
¶ Command line options to use for secure testing (in addition to required options).
Compile mode¶
-
name:
cfgCompileMode
, type:
Enum
, default:
Automatic
, deprecated name:
cfgUseDebug
¶ Select the compile mode of the MeVisLab executable to use in secure testing.
Values:
Title | Name | Deprecated Name | Description |
---|---|---|---|
Release | Release | TRUE | Use the fast, optimized Release mode version of MeVisLab. |
Debug | Debug | FALSE | Use the slower, unoptimized Debug version of MeVisLab, which is suitable for C++ debugging. |
Automatic | Automatic | Automatically select the same compile mode as the currently running MeVisLab (Release mode if not started from MeVisLab). |
New Test Case Type¶
-
name:
newTestCaseType
, type:
Enum
, default:
Inventor
¶
Values:
Title | Name |
---|---|
Inventor | Inventor |
ML | ML |
Macros | Macros |
Other | Other |