6.2. FAQ

Problem: My test does not load!

Answer: There is an error or warning message when the network is loaded or the Python script is evaluated. Check the MeVisLab debug console for warning and/or error messages and fix them.

 

Problem: I would like to create screenshots of viewers but would like to be able to work while the test is running, so some viewers may be hidden by other applications.

Answer: The TestCenter supports offscreen rendering for this purpose, see the TestCenter Reference and examples (and the next question).

 

Problem: I'm trying to use the offscreen rendering feature to create images of a 3D scene in a SoExaminerViewer, but they are all empty. What is the problem?

Answer: There are two things to be aware of: For successful offscreen rendering, the SoExaminerViewer needs a) to have been opened at least once before the screenshot is taken (call showViewerWindow() in the test's setUpTestCase() method for each viewer), and b) an external camera (e.g., SoPerspectiveCamera) connected to it. Of course, you are also required to trigger “viewAll” or “applyCameraOrientation”, but this is the same as for onscreen viewing.

 

Problem: I would like to save computed images or base objects along with the report. How can I do that?

Answer: For each test function, you can ask the test support for the temporary test output directory using Base.getResultDirectory(). Save all test results to that directory and, very important, add a Logging.showFile() statement for each file. This ensures that a) the data is copied along with the report to the final report destination defined in the TestCaseManager, and b) there is a link in the test report pointing to the file.

 

Problem: I would like to execute certain tests from the command line.

Answer: You can execute the TestCenter from the command line by calling TestCenter.py located in the %MLAB_ROOT%\MeVisLab\Standard\Modules\Macros\Tests\TestCenterAdvanced directory. See Section 3.2, “Local Testing from the Command Line” and TestCenter.py for available parameters.