Download Pilot Project for Model Based Testing using Conformiq Qtronic
Transcript
6.3 Problems This section describes problems that were encountered during the implementation of the pilot project. It also contains information on how those problems were solved. 6.3.1 Model difficulties There were other problems while modelling the pilot. Most of these had to do with mismatches between QML and the language used in RoseRT (C++), and between QML and the LTC scripting language Goat. Arrays In the implementation, arrays with dynamic size are represented by a data class containing two data fields. One of the fields is a pointer to the array content, and the other is an integer representing the length of the array. To model these arrays, the decision was to try and model them as Java arrays (QMLArrays), since pointers are not supported in Java. The integer field was still present, but the pointer field was instead replaced by an array of the same size as the value of the integer. Another problem was how to fill the array with a potentially varying number of predefined elements, depending on the value of the integer. To solve this problem a helper function was implemented, which uses a for-loop to add values to the array, depending on the size of the integer field. This worked fine for getting the desired result, but despite only having one such loop in the final model it still increased the time it took for Qtronic to generate the test cases. Inbound and outbound ports The representation of inbound or outbound port differs between Qtronic and RoseRT. In Qtronic, ports are declared as either inbound or outbound and different signals can go through each port. In RoseRT, however, the ports are bidirectional (signals can traverse in both directions) and instead it is the signals that are declared as inbound or outbound. This led to a small problem when naming the ports in the model, since a bidirectional port in RoseRT could not be represented as two different ports with the same name in Qtronic. To solve this, ports were given a suffix at the end of the name. These suffixes can be changed in the scripter configuration file, and the default values are _in or _out respectively. Default values At the beginning of the modelling project, there were some questions on how Qtronic determines values that are not affecting the outcome of the model in more than just one test case. For example, in some test cases the model was tested with a variable X 50 (67)