Automated Tests

Chapter VI: Testing

MeVisLab Tutorial Chapter VI Testing, Profiling and Debugging in MeVisLab The MeVisLab Integrated Development Environment (IDE) provides tools to write automated tests in Python, profile your network performance and to debug your Python code. All of these funtionalities will be addressed in this chapter. Testing The MeVisLab TestCenter is the starting point of your tests. Select [ File → Run TestCaseManager ] to open the user interface of the TestCaseManager.

Example 1: Writing a simple test case in MeVisLab

Example 1: Writing a simple test case in MeVisLab      This example is also available on YouTube. Introduction In this example, you will learn how to write an automated test for a simple network using the DicomImport, MinMaxScan and View3D modules. Afterwards, you will be able to write test cases for any other module and network yourself. Steps to do Creating the network to be used for testing Add the following modules to your workspace and connect them as seen below:

Example 3: Iterative tests in MeVisLab with Screenshots

Example 3: Iterative tests in MeVisLab      This example is also available on YouTube. Introduction In this example, you are writing an iterative test. Iterative test functions run a function for every specified input. They return a tuple consisting of the function object called and the inputs iterated over. The iterative test functions are useful if the same function should be applied to different input data. These could be input values, names of input images, etc.

Step 4: Review - Automated Tests

Step 4: Review - Automated Tests      This example is also available on YouTube. Introduction In the previous chapters you developed a macro module with User Interface and Python scripting. In this step you will see how to implement an automated test to verify and validate the Requirements defined in Overview. Steps to do Create a test network using your macro module Create a new and empty network and save it as *.