Model-based testing of industrial protocols toward the IRC5P controller
MetadataVis full innførsel
- Master's theses (TN-IDE) 
This thesis constitutes a partial requirement for the Master of Science degree in Industrial Automation and Signal Processing at the University of Stavanger. The assignment was undertaken during the Spring semester of 2014, and in cooperation with ABB Robotics where I am employed as a Research and Development Engineer in the Embedded Software department. In summary, the project constituted of attempting to develop an automatic test generation system for the PLC interface toward the Paint Robots that ABB Robotics develop in Bryne. The PLC interface is an important method of control for the robots, and it is vital that as many bugs as possible are uncovered and removed during the development process. Model-based testing was chosen as a method to generate the test cases, as the methods of Model-Based testing have achieved some success in being a state-of-the-art way of developing a vast amount of test-cases with very little code. The modelling tool utilized in this thesis is Spec Explorer, which is a model-based testing tool developed by Microsoft. Based on the language Spec#, a derivative of C#, the tool is intuitive and relatively simple to use. A simplified model of the System-Under-Test (SUT) was created in Spec Explorer, defined by rules and actions that attempt to mirror the behaviour of the controller to various inputs. Next, an implementation layer was added to directly translate the action calls invoked by the Spec Explorer model, into executable commands to the PLC via an OPC server/client relationship. The inputs from the PLC were then iterated through the controller, which outputs a return code. The return codes from the controller were compared to the expected return code from the model, whereby Spec Explorer would declare the test a success or failure based on whether the result conformed to the expected output. After succesfully implementing a Model-Based Testing system for the PLC interface, I wondered whether it would be possible to utlize the same model to test an entirely different protocol by simply writing a new adapter layer. Thus I decided develop a Model-Based Testing system for the Robot Web Service interface, which is a feature of the new Robotware 6 software currently in development. As this is new territory, the possibilities of finding bugs in the software was relatively high. This model differed slightly from the previous model, as I also implemented a form of "state-checking" in order to compare a subset of the state between the model and the SUT. The result of this thesis were two Model-Based Testing systems for both the PLC interface and the Robot Web Service interface toward the robot controller, which allow for automated test case generation for both of these interfaces. Initial testing of the Robot Web Service uncovered many faults, mainly due to differences in the two version of Robotware. After modifying the model in accordance with the differences in versions, several other faults were uncovered due to discrepancies in the return codes between the versions. After having implemented the state-checker, one major bug in the SUT was discovered, and relayed to the Robotics Headquarters in Sweden to patch. Although the majority of the faults uncovered were due to model faults, I would still claim this study to be a success. Model faults are both easily uncovered and easily rectified and once the model is primed to perfection, it is my opinion that this method will prove to be very useful in uncovering software bugs. This was demonstrated when the bug in the SUT was uncovered in the later stages of testing, once the model had been primed. Model-based testing also proved to be highly customizable, in the sense that by changing the adapter code, one can use the same model to generate test-cases in an entirely different test-environment.
Master's thesis in Cybernetics and signal processing