Block Tester Edit
The Block Tester executes a set of defined tests for a range of blocks. These tests can be run automatically in fixed time intervals (e.g. over night) to continuously verify the block functionality.
For each block a set of test cases has to be defined. A test case consists of:
- one source input for each ingoing port
- one target output for each outgoing port and
- a value for each property of the block.
- Optionally reference outputs can be defined for each port.
If reference outputs are defined, the real output is compared with the reference and its result is saved in a table.
Inputs and outputs of the blocks are directed to files that store the complete data of one port in an XML file. The defined test cases for the blocks are also saved in XML files. These files are gathered together in a folder for each block.
An ImageNet is created and executed for each test case. These nets consist of:
- the block to be tested
- a load block for each ingoing port and
- one save block for each outgoing port.
The load and save blocks are connected to the test block. Defined properties of the test block will be set. The nets are executed by an external program which is run from the Block Tester (look up QProcess). This way the Block Tester can continue, if the block crashes during execution, which will also be protocoled by the tester.
After all tests are executed, a summary of the results is saved. Optionally the results of the blocks can be verified by a user by displaying the saved output port contents.
Work Packages Edit
Ahmed Eldeep is working on the Block Tester.
- Save CImage Block in xml format
- Load CImage Block
- Equal operator (bool operator==(&CImage const) ) for CImage
- Define test cases, load and save them. Test case consists of:
- Ingoing port xml files
- Outgoing port xml files
- Optional reference xml files
- Test block properties
- Test case result (from executing the test case; changeable by user)
- Build test nets and save them
- Build program to execute defined / given ImageNet
- Run external program from the Block Tester to test a net and store the result
- Execute test nets for each test case, protocol results and save them into a file
- Integrate the 2D/3D dialog from the Designer into the Block Tester to view the CImages from the xml files for user verifying of the block results
- manual validity tests of blocks
- automatic and validity tests of blocks