According to Michael Fritzius, model based testing is building a less complex representation of how the system is supposed to work, taking the test data and running it through the model and the system and comparing the outputs. The model that is used in testing is usually a giant if-else structure generated by a different program, and the test data should be similar to the data the system is expected to use. If the outputs don’t match, there’s either a bug in the system or the model needs to be updated. Using model based testing helps find problems much faster and speeds up the automation phase.
Michael says Model based testing should be used when a lot of tests need to be made for a system or a lot of data data needs to be tested. Model based testing would make boundary testing, especially worst-case and robust boundary, much faster than writing out individual tests, given there is also a lot of data that must be tested. Model based testing may be useful when there’s a lot of tests that need to be made, but seems like a waste of time if there’s only a few tests needed. You’d just be rewriting code, but a bit simpler.
Michael also says that there’s not enough time to test everything. Model based testing would be used in a pinch when there’s not much time to actually test every aspect of a system, or perhaps when making a prototype for a complex system. These models would be used on what the customers need to have working first, then the next important working part and so on. I feel like using model based testing in this way is a huge risk, but saves a lot of time that could be put towards getting other aspects of a system done or to get a working example up and running. I would think afterwards any of the more problems that come up with the system could be fixed later on.
Podcast Link: https://www.joecolantonio.com/testtalks/191-model-based-testing-devops-michael-fritz-fritzius/
From the blog CS@Worcester – Joshua Farrar's Blog by jmfarrar1 and used with permission of the author. All other rights reserved by the author.
